Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1404879 > unrolled thread
| Started by | Jan Vesely <jan.vesely@rutgers.edu> |
|---|---|
| First post | 2016-05-21 20:20 +0200 |
| Last post | 2016-05-21 20:20 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/2] iommu/amd: Remove entry from the list before freeing it Jan Vesely <jan.vesely@rutgers.edu> - 2016-05-21 20:20 +0200
[PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain Jan Vesely <jan.vesely@rutgers.edu> - 2016-05-21 20:20 +0200
| From | Jan Vesely <jan.vesely@rutgers.edu> |
|---|---|
| Date | 2016-05-21 20:20 +0200 |
| Subject | [PATCH 1/2] iommu/amd: Remove entry from the list before freeing it |
| Message-ID | <rBjFf-6V9-7@gated-at.bofh.it> |
From: Jan Vesely <jan.vesely@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@amd.com>
---
drivers/iommu/amd_iommu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 634f636..17c76f2 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3288,8 +3288,10 @@ static void amd_iommu_put_dm_regions(struct device *dev,
{
struct iommu_dm_region *entry, *next;
- list_for_each_entry_safe(entry, next, head, list)
+ list_for_each_entry_safe(entry, next, head, list) {
+ list_del(&entry->list);
kfree(entry);
+ }
}
static const struct iommu_ops amd_iommu_ops = {
--
2.5.5
[toc] | [next] | [standalone]
| From | Jan Vesely <jan.vesely@rutgers.edu> |
|---|---|
| Date | 2016-05-21 20:20 +0200 |
| Subject | [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain |
| Message-ID | <rBjFf-6V9-5@gated-at.bofh.it> |
| In reply to | #1404879 |
From: Jan Vesely <jan.vesely@amd.com> Signed-off-by: Jan Vesely <jan.vesely@amd.com> --- drivers/iommu/amd_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 17c76f2..4ff5e40 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -3016,6 +3016,7 @@ static void protection_domain_free(struct protection_domain *domain) del_domain_from_list(domain); + mutex_destroy(&domain->api_lock); if (domain->id) domain_id_free(domain->id); -- 2.5.5
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web