diff options
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 @@ | |||
5 | #include <linux/memblock.h> | 5 | #include <linux/memblock.h> |
6 | #include <linux/swapfile.h> | 6 | #include <linux/swapfile.h> |
7 | #include <linux/swapops.h> | 7 | #include <linux/swapops.h> |
8 | #include <linux/kmemleak.h> | ||
8 | 9 | ||
9 | #include <asm/set_memory.h> | 10 | #include <asm/set_memory.h> |
10 | #include <asm/e820/api.h> | 11 | #include <asm/e820/api.h> |
@@ -766,6 +767,11 @@ void free_init_pages(const char *what, unsigned long begin, unsigned long end) | |||
766 | if (debug_pagealloc_enabled()) { | 767 | if (debug_pagealloc_enabled()) { |
767 | pr_info("debug: unmapping init [mem %#010lx-%#010lx]\n", | 768 | pr_info("debug: unmapping init [mem %#010lx-%#010lx]\n", |
768 | begin, end - 1); | 769 | begin, end - 1); |
770 | /* | ||
771 | * Inform kmemleak about the hole in the memory since the | ||
772 | * corresponding pages will be unmapped. | ||
773 | */ | ||
774 | kmemleak_free_part((void *)begin, end - begin); | ||
769 | set_memory_np(begin, (end - begin) >> PAGE_SHIFT); | 775 | set_memory_np(begin, (end - begin) >> PAGE_SHIFT); |
770 | } else { | 776 | } else { |
771 | /* | 777 | /* |