]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kmemleak: Initialise kmemleak after debug_objects_mem_init()
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 19 May 2011 15:25:30 +0000 (16:25 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:31:24 +0000 (09:31 +0900)
commit41989a22f4afd8f1b3caffd837d2d2597c4907d6
treee11c7b8c795315bf005e353a55a07a21cfcf5f07
parenteb9f63d0497bdcd721738c42c33acd07cd9558d1
kmemleak: Initialise kmemleak after debug_objects_mem_init()

commit 9b090f2da85bd0df5e1a1ecfe4120b7b50358f48 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
init/main.c