lkml.org 
[lkml]   [2007]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] dump_stack on panic
From
Date
Is there any reason why we don't do a dump_stack on panic?

I find this soooo useful in the -rt patch, where Ingo has placed a
dump_stack on panic. With mainline, when I hit a panic, I don't always
know how it got there. So I find myself adding the dump_stack and trying
to create the bug again.

This patch simply adds dump_stack to panic.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/panic.c b/kernel/panic.c
index 6f6e03e..bd481d7 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -78,6 +78,7 @@ NORET_TYPE void panic(const char * fmt, ...)
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
+ dump_stack();
bust_spinlocks(0);

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-31 01:07    [W:0.486 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site