[PATCH] make bug messages more consistent
authorIngo Molnar <mingo@elte.hu>
Thu, 23 Mar 2006 11:00:54 +0000 (03:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:16 +0000 (07:38 -0800)
Consolidate all kernel bug printouts to begin with the "BUG: " string.
Makes it easier to find them in large bootup logs.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/nmi.c
arch/i386/mm/fault.c
include/asm-generic/bug.h
kernel/sched.c

index be87c5e2ee9584747e05b57f8ce60ee2b29d93ed..1db34effdd8d3357e545c081b0f1aa3ce749a638 100644 (file)
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
                        /*
                         * die_nmi will return ONLY if NOTIFY_STOP happens..
                         */
-                       die_nmi(regs, "NMI Watchdog detected LOCKUP");
+                       die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP");
        } else {
                last_irq_sums[cpu] = sum;
                alert_counter[cpu] = 0;
index bbb24af5d860ba8c104976e6d060c630893392ff..47a3b72ec7b677503d5a96cd1f9002b9efacae86 100644 (file)
@@ -518,9 +518,9 @@ no_context:
        }
 #endif
        if (address < PAGE_SIZE)
-               printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
+               printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer dereference");
        else
-               printk(KERN_ALERT "Unable to handle kernel paging request");
+               printk(KERN_ALERT "BUG: unable to handle kernel paging request");
        printk(" at virtual address %08lx\n",address);
        printk(KERN_ALERT " printing eip:\n");
        printk("%08lx\n", regs->eip);
index 400c2b41896ed2a765cf2750bd7af3ea8dd57f18..1a565a9d2fa72f0860fb4496eb2454f88b1e4556 100644 (file)
@@ -7,7 +7,7 @@
 #ifdef CONFIG_BUG
 #ifndef HAVE_ARCH_BUG
 #define BUG() do { \
-       printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+       printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
        panic("BUG!"); \
 } while (0)
 #endif
@@ -19,7 +19,7 @@
 #ifndef HAVE_ARCH_WARN_ON
 #define WARN_ON(condition) do { \
        if (unlikely((condition)!=0)) { \
-               printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
+               printk("BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \
                dump_stack(); \
        } \
 } while (0)
index a5bd60453eae0559fb0aa423c24ad745a3d4cf45..7ffaabd64f893863bd485bd32b8f77e672cec9be 100644 (file)
@@ -2873,7 +2873,7 @@ asmlinkage void __sched schedule(void)
         */
        if (likely(!current->exit_state)) {
                if (unlikely(in_atomic())) {
-                       printk(KERN_ERR "scheduling while atomic: "
+                       printk(KERN_ERR "BUG: scheduling while atomic: "
                                "%s/0x%08x/%d\n",
                                current->comm, preempt_count(), current->pid);
                        dump_stack();
@@ -6074,7 +6074,7 @@ void __might_sleep(char *file, int line)
                if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
                        return;
                prev_jiffy = jiffies;
-               printk(KERN_ERR "Debug: sleeping function called from invalid"
+               printk(KERN_ERR "BUG: sleeping function called from invalid"
                                " context at %s:%d\n", file, line);
                printk("in_atomic():%d, irqs_disabled():%d\n",
                        in_atomic(), irqs_disabled());