summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-01-06 06:18:23 (GMT)
committerJoerg Roedel <joro@8bytes.org>2014-01-09 11:43:43 (GMT)
commita84da70b7ba0c5236fccf25115acefc235ed65f9 (patch)
tree906dd550826b135cf122096b0c3079fee9a4ed1d /drivers/iommu
parent5ced12af691771a424fc3bcabecd668025517ebd (diff)
downloadlinux-a84da70b7ba0c5236fccf25115acefc235ed65f9.tar.xz
iommu/vt-d: release invalidation queue when destroying IOMMU unit
Release associated invalidation queue when destroying IOMMU unit to avoid memory leak. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/dmar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index b0df78f..726cfe2 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -737,6 +737,12 @@ static void free_iommu(struct intel_iommu *iommu)
destroy_irq(iommu->irq);
}
+ if (iommu->qi) {
+ free_page((unsigned long)iommu->qi->desc);
+ kfree(iommu->qi->desc_status);
+ kfree(iommu->qi);
+ }
+
if (iommu->reg)
unmap_iommu(iommu);