Skip to content

Commit

Permalink
um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb()
Browse files Browse the repository at this point in the history
Commit b2b29d6 ("mm: account PMD tables like PTE tables") uncovered
a bug in uml, we forgot to call the destructor.
While we are here, give x a sane name.

Reported-by: Anton Ivanov <[email protected]>
Co-developed-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Tested-by: Christopher Obbard <[email protected]>
  • Loading branch information
richardweinberger committed Nov 10, 2020
1 parent eccc876 commit 9a5085b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/um/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ do { \
} while (0)

#ifdef CONFIG_3_LEVEL_PGTABLES
#define __pmd_free_tlb(tlb,x, address) tlb_remove_page((tlb),virt_to_page(x))

#define __pmd_free_tlb(tlb, pmd, address) \
do { \
pgtable_pmd_page_dtor(virt_to_page(pmd)); \
tlb_remove_page((tlb),virt_to_page(pmd)); \
} while (0) \

#endif

#endif
Expand Down

0 comments on commit 9a5085b

Please sign in to comment.