aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2011-05-19 11:25:30 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2011-05-19 12:36:37 -0400
commit9b090f2da85bd0df5e1a1ecfe4120b7b50358f48 (patch)
treecbf13036b3ade83d5f13b8ff03be47ef312171c9 /init
parent79e0d9bd262bdd36009e8092e57e34dc5e22a1c7 (diff)
kmemleak: Initialise kmemleak after debug_objects_mem_init()
Kmemleak frees objects via RCU and when CONFIG_DEBUG_OBJECTS_RCU_HEAD is enabled, the RCU callback triggers a call to free_object() in lib/debugobjects.c. Since kmemleak is initialised before debug objects initialisation, it may result in a kernel panic during booting. This patch moves the kmemleak_init() call after debug_objects_mem_init(). Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Tested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: <stable@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index 4a9479ef4540..48df882d51d2 100644
--- a/init/main.c
+++ b/init/main.c
@@ -580,8 +580,8 @@ asmlinkage void __init start_kernel(void)
580#endif 580#endif
581 page_cgroup_init(); 581 page_cgroup_init();
582 enable_debug_pagealloc(); 582 enable_debug_pagealloc();
583 kmemleak_init();
584 debug_objects_mem_init(); 583 debug_objects_mem_init();
584 kmemleak_init();
585 setup_per_cpu_pageset(); 585 setup_per_cpu_pageset();
586 numa_policy_init(); 586 numa_policy_init();
587 if (late_time_init) 587 if (late_time_init)