瀏覽代碼

lockdep: Add print_irqtrace_events() to __warn

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>
Steven Rostedt (VMware) 7 年之前
父節點
當前提交
4c281074d2
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      kernel/panic.c

+ 2 - 0
kernel/panic.c

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