diff options
author | Joel Stanley <joel@jms.id.au> | 2019-05-08 16:48:45 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2019-05-08 16:48:48 +0300 |
commit | d09fc0c4bdfbcbe251df247b5a94e2a07dec9c2f (patch) | |
tree | 893d98100d3ede2ff76905a67e1b9798c8c88868 /arch/x86/mm/init.c | |
parent | 76cc3bd0c342199b0bc0fd6afc7035274bf7a718 (diff) | |
parent | 274ede3e1a5fb3d0fd33acafb08993e95972c51f (diff) | |
download | linux-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.c | 6 |
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 { /* |