i386: print stack size in oops messages
PATCH 1/1 i386: print stack size in oops messages
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 <[email protected]>
---
arch/i386/kernel/traps.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-)
arch/i386/kernel/traps.c +3 -11
@@ -362,30 +362,22 @@ void die(const char * str, struct pt_reglocal_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 ) {
Signature · 1 line
Chuck
Quoted 4 lines · Chuck Ebbert
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 <[email protected]>
Thank you. Since I always use preempt (it saved me from more than one hard crash when kernel debugging), this is useful too me.