]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kmemleak: Show where early_log issues come from
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 28 Sep 2011 11:17:03 +0000 (12:17 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 8 Nov 2011 10:32:42 +0000 (10:32 +0000)
commita8a89855a074c1e9e7c0cb2c64063d3ea4dbdc6b
tree8e8fb8aa14a739cc99dcfc015b8cc32cbffad921
parent1ea6b8f48918282bdca0b32a34095504ee65bab5
kmemleak: Show where early_log issues come from

Based on initial patch by Steven Rostedt.

Early kmemleak warnings did not show where the actual kmemleak API had
been called from but rather just a backtrace to the kmemleak_init()
function. By having all early kmemleak logs record the stack_trace, we
can have kmemleak_init() write exactly where the problem occurred. This
patch adds the setting of the kmemleak_warning variable every time a
kmemleak warning is issued. The kmemleak_init() function checks this
variable during early log replaying and prints the log trace if there
was any warning.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
mm/kmemleak.c