Commit 34c0989c authored by Andrei Dulea's avatar Andrei Dulea Committed by Joerg Roedel

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: 409afa44 ("iommu/amd: Introduce free_sub_pt() function")
Signed-off-by: default avatarAndrei Dulea <adulea@amazon.de>
parent e95adb9a
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment