Skip to content

Commit

Permalink
iommu/vt-d: release invalidation queue when destroying IOMMU unit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiang Liu authored and Joerg Roedel committed Jan 9, 2014
1 parent 5ced12a commit a84da70
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/iommu/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a84da70

Please sign in to comment.