summaryrefslogtreecommitdiff
path: root/arch/x86/mm/init.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2019-05-08 16:48:45 +0300
committerJoel Stanley <joel@jms.id.au>2019-05-08 16:48:48 +0300
commitd09fc0c4bdfbcbe251df247b5a94e2a07dec9c2f (patch)
tree893d98100d3ede2ff76905a67e1b9798c8c88868 /arch/x86/mm/init.c
parent76cc3bd0c342199b0bc0fd6afc7035274bf7a718 (diff)
parent274ede3e1a5fb3d0fd33acafb08993e95972c51f (diff)
downloadlinux-dev-5.0.tar.xz
Merge tag 'v5.0.14' into dev-5.0dev-5.0
This is the 5.0.14 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'arch/x86/mm/init.c')
-rw-r--r--arch/x86/mm/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index f905a2371080..8dacdb96899e 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -5,6 +5,7 @@
#include <linux/memblock.h>
#include <linux/swapfile.h>
#include <linux/swapops.h>
+#include <linux/kmemleak.h>
#include <asm/set_memory.h>
#include <asm/e820/api.h>
@@ -766,6 +767,11 @@ void free_init_pages(const char *what, unsigned long begin, unsigned long end)
if (debug_pagealloc_enabled()) {
pr_info("debug: unmapping init [mem %#010lx-%#010lx]\n",
begin, end - 1);
+ /*
+ * Inform kmemleak about the hole in the memory since the
+ * corresponding pages will be unmapped.
+ */
+ kmemleak_free_part((void *)begin, end - begin);
set_memory_np(begin, (end - begin) >> PAGE_SHIFT);
} else {
/*