mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
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>
This commit is contained in:
parent
79e0d9bd26
commit
9b090f2da8
@ -580,8 +580,8 @@ asmlinkage void __init start_kernel(void)
|
||||
#endif
|
||||
page_cgroup_init();
|
||||
enable_debug_pagealloc();
|
||||
kmemleak_init();
|
||||
debug_objects_mem_init();
|
||||
kmemleak_init();
|
||||
setup_per_cpu_pageset();
|
||||
numa_policy_init();
|
||||
if (late_time_init)
|
||||
|
Loading…
Reference in New Issue
Block a user