aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/traps_32.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-17 18:04:40 +0200
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-17 20:16:52 +0200
commit9aa8d7195acb18fc436847f6c66a97f8359ad54d (patch)
treedea6832422b478791007c49e8cc6ccd414d900e9 /arch/x86/kernel/traps_32.c
parentc1e3619edd2b3e17450d745e27e335490cafd78d (diff)
i386: clean up oops/bug reports
Typically the oops first lines look like this: BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c049dfbd *pde = 00000000 Oops: 0002 [#1] PREEMPT SMP ... Such output is gained with some ugly if (!nl) printk("\n"); code and besides being a waste of lines, this is also annoying to read. The following output looks better (and it is how it looks on x86_64): BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c049dfbd *pde = 00000000 Oops: 0002 [#1] PREEMPT SMP ... [ tglx: arch/x86 adaptation ] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r--arch/x86/kernel/traps_32.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 83a9bbbbe38..b132d3957df 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -398,31 +398,24 @@ void die(const char * str, struct pt_regs * regs, long err)
local_save_flags(flags);
if (++die.lock_owner_depth < 3) {
- int nl = 0;
unsigned long esp;
unsigned short ss;
report_bug(regs->eip, regs);
- printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
+ printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff,
+ ++die_counter);
#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) {