mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] i386: print stack size in oops messages
@ 2006-06-05  3:07 Chuck Ebbert
  2006-06-05 21:26 ` Joshua Hudson
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2006-06-05  3:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Linus Torvalds

Always print stack size in oops messages.  By having this line
in every message, ugly newline logic can be removed as well.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>

---

 arch/i386/kernel/traps.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

--- 2.6.17-rc5-32.orig/arch/i386/kernel/traps.c
+++ 2.6.17-rc5-32/arch/i386/kernel/traps.c
@@ -362,30 +362,22 @@ void die(const char * str, struct pt_reg
 		local_save_flags(flags);
 
 	if (++die.lock_owner_depth < 3) {
-		int nl = 0;
 		unsigned long esp;
 		unsigned short ss;
 
 		handle_BUG(regs);
 		printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
+		printk(KERN_EMERG "%dK_STACKS ", THREAD_SIZE / 1024);
 #ifdef CONFIG_PREEMPT
-		printk(KERN_EMERG "PREEMPT ");
-		nl = 1;
+		printk("PREEMPT ");
 #endif
 #ifdef CONFIG_SMP
-		if (!nl)
-			printk(KERN_EMERG);
 		printk("SMP ");
-		nl = 1;
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
-		if (!nl)
-			printk(KERN_EMERG);
 		printk("DEBUG_PAGEALLOC");
-		nl = 1;
 #endif
-		if (nl)
-			printk("\n");
+		printk("\n");
 		if (notify_die(DIE_OOPS, str, regs, err,
 					current->thread.trap_no, SIGSEGV) !=
 				NOTIFY_STOP) {
-- 
Chuck

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-05 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-05  3:07 [patch] i386: print stack size in oops messages Chuck Ebbert
2006-06-05 21:26 ` Joshua Hudson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®