Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

panic: call console_verbose() in panic

Most distros turn the console verbosity down and that means a backtrace
after a panic never makes it to the console. I assume we haven't seen
this because a panic is often preceeded by an oops which will have called
console_verbose. There are however a lot of places we call panic
directly, and they are broken.

Use console_verbose like we do in the oops path to ensure a directly
called panic will print a backtrace.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Anton Blanchard and committed by
Linus Torvalds
5b530fc1 cccad8f9

+1
+1
kernel/panic.c
··· 87 87 */ 88 88 preempt_disable(); 89 89 90 + console_verbose(); 90 91 bust_spinlocks(1); 91 92 va_start(args, fmt); 92 93 vsnprintf(buf, sizeof(buf), fmt, args);