|
@@ -100,6 +100,7 @@
|
|
|
|
|
|
#include <linux/kmemcheck.h>
|
|
#include <linux/kmemcheck.h>
|
|
#include <linux/kmemleak.h>
|
|
#include <linux/kmemleak.h>
|
|
|
|
+#include <linux/memory_hotplug.h>
|
|
|
|
|
|
/*
|
|
/*
|
|
* Kmemleak configuration and common defines.
|
|
* Kmemleak configuration and common defines.
|
|
@@ -1292,9 +1293,9 @@ static void kmemleak_scan(void)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Struct page scanning for each node. The code below is not yet safe
|
|
|
|
- * with MEMORY_HOTPLUG.
|
|
|
|
|
|
+ * Struct page scanning for each node.
|
|
*/
|
|
*/
|
|
|
|
+ lock_memory_hotplug();
|
|
for_each_online_node(i) {
|
|
for_each_online_node(i) {
|
|
pg_data_t *pgdat = NODE_DATA(i);
|
|
pg_data_t *pgdat = NODE_DATA(i);
|
|
unsigned long start_pfn = pgdat->node_start_pfn;
|
|
unsigned long start_pfn = pgdat->node_start_pfn;
|
|
@@ -1313,6 +1314,7 @@ static void kmemleak_scan(void)
|
|
scan_block(page, page + 1, NULL, 1);
|
|
scan_block(page, page + 1, NULL, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ unlock_memory_hotplug();
|
|
|
|
|
|
/*
|
|
/*
|
|
* Scanning the task stacks (may introduce false negatives).
|
|
* Scanning the task stacks (may introduce false negatives).
|