summaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2020-10-19 23:10:49 +0200
committerRichard Weinberger <richard@nod.at>2020-11-10 21:49:32 +0100
commit9a5085b3fad5d5d6019a3d160cdd70357d35c8b1 (patch)
tree74f2c420e7f8ed6aa1b78590c51cdb2dfd9200d9 /arch/um
parenteccc876724927ff3b9ff91f36f7b6b159e948f0c (diff)
downloadlinux-9a5085b3fad5d5d6019a3d160cdd70357d35c8b1.tar.gz
linux-9a5085b3fad5d5d6019a3d160cdd70357d35c8b1.tar.bz2
linux-9a5085b3fad5d5d6019a3d160cdd70357d35c8b1.zip
um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb()
Commit b2b29d6d0119 ("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>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/include/asm/pgalloc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/um/include/asm/pgalloc.h b/arch/um/include/asm/pgalloc.h
index 5393e13e07e0..2bbf28cf3aa9 100644
--- a/arch/um/include/asm/pgalloc.h
+++ b/arch/um/include/asm/pgalloc.h
@@ -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