summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-01-06 14:18:23 +0800
committerJoerg Roedel <joro@8bytes.org>2014-01-09 12:43:43 +0100
commita84da70b7ba0c5236fccf25115acefc235ed65f9 (patch)
tree906dd550826b135cf122096b0c3079fee9a4ed1d /drivers
parent5ced12af691771a424fc3bcabecd668025517ebd (diff)
downloadop-kernel-dev-a84da70b7ba0c5236fccf25115acefc235ed65f9.zip
op-kernel-dev-a84da70b7ba0c5236fccf25115acefc235ed65f9.tar.gz
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')
-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 b0df78f9..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);
OpenPOWER on IntegriCloud