diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-04-30 07:51:54 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-04-30 07:51:54 +0200 |
commit | d5963d87bf84060ff3fb572bf6d3606f7fd087d1 (patch) | |
tree | 5a94c33a56d7bdd91a38aa0ec50e9202914f742e /arch/x86/mm | |
parent | 3db6d5a5ecaf0a778d721ccf9809248350d4bfaf (diff) | |
parent | 37624b58542fb9f2d9a70e6ea006ef8a5f66c30b (diff) |
Merge tag 'v5.1-rc7' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm')
-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 { /* |