|
@@ -6,6 +6,7 @@
|
|
|
#include <linux/bootmem.h> /* for max_low_pfn */
|
|
#include <linux/bootmem.h> /* for max_low_pfn */
|
|
|
#include <linux/swapfile.h>
|
|
#include <linux/swapfile.h>
|
|
|
#include <linux/swapops.h>
|
|
#include <linux/swapops.h>
|
|
|
|
|
+#include <linux/kmemleak.h>
|
|
|
|
|
|
|
|
#include <asm/set_memory.h>
|
|
#include <asm/set_memory.h>
|
|
|
#include <asm/e820/api.h>
|
|
#include <asm/e820/api.h>
|
|
@@ -767,6 +768,11 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
|
|
|
if (debug_pagealloc_enabled()) {
|
|
if (debug_pagealloc_enabled()) {
|
|
|
pr_info("debug: unmapping init [mem %#010lx-%#010lx]\n",
|
|
pr_info("debug: unmapping init [mem %#010lx-%#010lx]\n",
|
|
|
begin, end - 1);
|
|
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);
|
|
set_memory_np(begin, (end - begin) >> PAGE_SHIFT);
|
|
|
} else {
|
|
} else {
|
|
|
/*
|
|
/*
|