[PATCH] dump_stack on panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux