iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iommu/amd: Remove entry from the list before freeing it
@ 2016-05-21 18:11 Jan Vesely
  2016-05-21 18:11 ` [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain Jan Vesely
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Vesely @ 2016-05-21 18:11 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: iommu, linux-kernel, Jan Vesely

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-28 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-21 18:11 [PATCH 1/2] iommu/amd: Remove entry from the list before freeing it Jan Vesely
2016-05-21 18:11 ` [PATCH 2/2] iommu/amd: Destroy api_lock mutex when freeing domain Jan Vesely
     [not found]   ` <1463854264-26445-2-git-send-email-jan.vesely-kgbqMDwikbSVc3sceRu5cw@public.gmane.org>
2016-06-09 15:48     ` Vesely, Jan
2016-06-15 11:54       ` joro
     [not found]         ` <20160615115406.GF26566-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-06-15 17:53           ` Vesely, Jan
2016-06-15 20:53             ` Borislav Petkov
     [not found]               ` <20160615205311.GB19822-fF5Pk5pvG8Y@public.gmane.org>
2016-06-28 16:48                 ` Vesely, Jan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).