OSDN Git Service

lockdep: Add print_irqtrace_events() to __warn
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 3 Apr 2018 14:31:47 +0000 (10:31 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 6 Apr 2018 12:56:51 +0000 (08:56 -0400)
Running a test on a x86_32 kernel I triggered a bug that an interrupt
disable/enable isn't being catched by lockdep. At least knowing where the
last one was found would be helpful, but the warnings that are produced do
not show this information. Even without debugging lockdep, having the WARN()
display the last place hard and soft irqs were enabled or disabled is
valuable.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/panic.c

index 2cfef40..fa8d4cc 100644 (file)
@@ -554,6 +554,8 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
        else
                dump_stack();
 
+       print_irqtrace_events(current);
+
        print_oops_end_marker();
 
        /* Just a warning, don't kill lockdep. */