diff options
author | Andrei Dulea <adulea@amazon.de> | 2019-09-13 17:42:28 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-09-24 12:15:09 +0300 |
commit | 34c0989c05314b0288b058a4d1f6e58e2d320929 (patch) | |
tree | 668ffe6957423eb08ee409b9dd3afce1304c0e12 /drivers/iommu | |
parent | e95adb9add75affb98570a518c902f50e5fcce1b (diff) | |
download | linux-34c0989c05314b0288b058a4d1f6e58e2d320929.tar.xz |
iommu/amd: Fix pages leak in free_pagetable()
Take into account the gathered freelist in free_sub_pt(), otherwise we
end up leaking all that pages.
Fixes: 409afa44f9ba ("iommu/amd: Introduce free_sub_pt() function")
Signed-off-by: Andrei Dulea <adulea@amazon.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 1ed3b98324ba..138547446345 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1425,7 +1425,7 @@ static void free_pagetable(struct protection_domain *domain) BUG_ON(domain->mode < PAGE_MODE_NONE || domain->mode > PAGE_MODE_6_LEVEL); - free_sub_pt(root, domain->mode, freelist); + freelist = free_sub_pt(root, domain->mode, freelist); free_page_list(freelist); } |