Skip to content

Commit

Permalink
panic: don't print redundant backtraces on oops
Browse files Browse the repository at this point in the history
When an oops causes a panic and panic prints another backtrace it's pretty
common to have the original oops data be scrolled away on a 80x50 screen.

The second backtrace is quite redundant and not needed anyways.

So don't print the panic backtrace when oops_in_progress is true.

[akpm@linux-foundation.org: add comment]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 13, 2012
1 parent b8f566b commit 6e6f0a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ void panic(const char *fmt, ...)
va_end(args);
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
#ifdef CONFIG_DEBUG_BUGVERBOSE
dump_stack();
/*
* Avoid nested stack-dumping if a panic occurs during oops processing
*/
if (!oops_in_progress)
dump_stack();
#endif

/*
Expand Down

0 comments on commit 6e6f0a1

Please sign in to comment.