Skip to content

Commit 34c0989

Browse files
Andrei Duleajoergroedel
authored andcommitted
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: 409afa4 ("iommu/amd: Introduce free_sub_pt() function") Signed-off-by: Andrei Dulea <[email protected]>
1 parent e95adb9 commit 34c0989

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ static void free_pagetable(struct protection_domain *domain)
14251425
BUG_ON(domain->mode < PAGE_MODE_NONE ||
14261426
domain->mode > PAGE_MODE_6_LEVEL);
14271427

1428-
free_sub_pt(root, domain->mode, freelist);
1428+
freelist = free_sub_pt(root, domain->mode, freelist);
14291429

14301430
free_page_list(freelist);
14311431
}

0 commit comments

Comments
 (0)