um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb()

Commit b2b29d6d01 ("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 <anton.ivanov@cambridgegreys.com>
Co-developed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
This commit is contained in:
Richard Weinberger 2020-10-19 23:10:49 +02:00
parent eccc876724
commit 9a5085b3fa
1 changed files with 7 additions and 1 deletions

View File

@ -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