Commit d4a006b9 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Use KERN_ALERT more for oopses

Often users only report what syslogd reports with KERN_ALERT when a kernel
crash occurs.  Make an oops print mpre information with that (in particular
the RIP)

Patch for i386 and x86-64.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f6a0ebca
......@@ -283,7 +283,7 @@ static void handle_BUG(struct pt_regs *regs)
file = "<bad filename>";
printk("------------[ cut here ]------------\n");
printk("kernel BUG at %s:%d!\n", file, line);
printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line);
no_bug:
return;
......@@ -304,7 +304,7 @@ void die(const char * str, struct pt_regs * regs, long err)
spin_lock_irq(&die_lock);
bust_spinlocks(1);
handle_BUG(regs);
printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
#ifdef CONFIG_PREEMPT
printk("PREEMPT ");
nl = 1;
......
......@@ -411,7 +411,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
else
printk(KERN_ALERT "Unable to handle kernel paging request");
printk(" at virtual address %08lx\n",address);
printk(" printing eip:\n");
printk(KERN_ALERT " printing eip:\n");
printk("%08lx\n", regs->eip);
asm("movl %%cr3,%0":"=r" (page));
page = ((unsigned long *) __va(page))[address >> 22];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment