iommu/amd: Fix memory leak in free_pagetable
authorJoerg Roedel <joro@8bytes.org>
Thu, 20 Jun 2013 18:22:58 +0000 (20:22 +0200)
committerJoerg Roedel <joro@8bytes.org>
Thu, 20 Jun 2013 21:38:42 +0000 (23:38 +0200)
commit5c34c403b72395e59cad64a75fb0b772b0ab9cd4
treef3459a9eef55dfa8e382f363c55ee3a4c9b2346e
parent7d132055814ef17a6c7b69f342244c410a5e000f
iommu/amd: Fix memory leak in free_pagetable

The IOMMU pagetables can have up to 6 levels, but the code
in free_pagetable() only releases the first 3 levels. Fix
this leak by releasing all levels.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
drivers/iommu/amd_iommu.c