diff options
-rw-r--r-- | lib/Kconfig.debug | 2 | ||||
-rw-r--r-- | mm/kmemleak.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 82928f5ea049..8745ac7d1f75 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -414,7 +414,7 @@ config SLUB_STATS | |||
414 | 414 | ||
415 | config DEBUG_KMEMLEAK | 415 | config DEBUG_KMEMLEAK |
416 | bool "Kernel memory leak detector" | 416 | bool "Kernel memory leak detector" |
417 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ | 417 | depends on DEBUG_KERNEL && EXPERIMENTAL && \ |
418 | (X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || MICROBLAZE || TILE) | 418 | (X86 || ARM || PPC || MIPS || S390 || SPARC64 || SUPERH || MICROBLAZE || TILE) |
419 | 419 | ||
420 | select DEBUG_FS | 420 | select DEBUG_FS |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 15c50302ff93..c833addd94d7 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
@@ -100,6 +100,7 @@ | |||
100 | 100 | ||
101 | #include <linux/kmemcheck.h> | 101 | #include <linux/kmemcheck.h> |
102 | #include <linux/kmemleak.h> | 102 | #include <linux/kmemleak.h> |
103 | #include <linux/memory_hotplug.h> | ||
103 | 104 | ||
104 | /* | 105 | /* |
105 | * Kmemleak configuration and common defines. | 106 | * Kmemleak configuration and common defines. |
@@ -1292,9 +1293,9 @@ static void kmemleak_scan(void) | |||
1292 | #endif | 1293 | #endif |
1293 | 1294 | ||
1294 | /* | 1295 | /* |
1295 | * Struct page scanning for each node. The code below is not yet safe | 1296 | * Struct page scanning for each node. |
1296 | * with MEMORY_HOTPLUG. | ||
1297 | */ | 1297 | */ |
1298 | lock_memory_hotplug(); | ||
1298 | for_each_online_node(i) { | 1299 | for_each_online_node(i) { |
1299 | pg_data_t *pgdat = NODE_DATA(i); | 1300 | pg_data_t *pgdat = NODE_DATA(i); |
1300 | unsigned long start_pfn = pgdat->node_start_pfn; | 1301 | unsigned long start_pfn = pgdat->node_start_pfn; |
@@ -1313,6 +1314,7 @@ static void kmemleak_scan(void) | |||
1313 | scan_block(page, page + 1, NULL, 1); | 1314 | scan_block(page, page + 1, NULL, 1); |
1314 | } | 1315 | } |
1315 | } | 1316 | } |
1317 | unlock_memory_hotplug(); | ||
1316 | 1318 | ||
1317 | /* | 1319 | /* |
1318 | * Scanning the task stacks (may introduce false negatives). | 1320 | * Scanning the task stacks (may introduce false negatives). |