diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-03 18:03:47 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-03 18:03:47 +0200 |
commit | 12456e509be25d24fe479394852428517922d02a (patch) | |
tree | 8b1e8e1025ce1beb350bbf977ac8b8ffdd5fbfa1 /arch/x86/mm/init.c | |
parent | 6f6a407a591ebe3e4c6bd2329b29862b3980a3ca (diff) | |
parent | 37624b58542fb9f2d9a70e6ea006ef8a5f66c30b (diff) | |
download | linux-12456e509be25d24fe479394852428517922d02a.tar.gz linux-12456e509be25d24fe479394852428517922d02a.tar.bz2 linux-12456e509be25d24fe479394852428517922d02a.zip |
Merge 5.1-rc7 into usb-next
We need this to make the usb-gadget branch merge cleaner. And for
testing to keep from hitting the same issues already fixed.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 { /* |