aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-23 06:00:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:16 -0500
commit91368d73e4b60d577ad171e5bd315b564265fcdb (patch)
tree067d3738aa4bf8d49623632bb47952aca6f8f965
parent3257545e40a769cbef98cf13eabe50f00712991e (diff)
[PATCH] make bug messages more consistent
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>
-rw-r--r--arch/i386/kernel/nmi.c2
-rw-r--r--arch/i386/mm/fault.c4
-rw-r--r--include/asm-generic/bug.h4
-rw-r--r--kernel/sched.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index be87c5e2ee95..1db34effdd8d 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
543 /* 543 /*
544 * die_nmi will return ONLY if NOTIFY_STOP happens.. 544 * die_nmi will return ONLY if NOTIFY_STOP happens..
545 */ 545 */
546 die_nmi(regs, "NMI Watchdog detected LOCKUP"); 546 die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP");
547 } else { 547 } else {
548 last_irq_sums[cpu] = sum; 548 last_irq_sums[cpu] = sum;
549 alert_counter[cpu] = 0; 549 alert_counter[cpu] = 0;
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index bbb24af5d860..47a3b72ec7b6 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -518,9 +518,9 @@ no_context:
518 } 518 }
519#endif 519#endif
520 if (address < PAGE_SIZE) 520 if (address < PAGE_SIZE)
521 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); 521 printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer dereference");
522 else 522 else
523 printk(KERN_ALERT "Unable to handle kernel paging request"); 523 printk(KERN_ALERT "BUG: unable to handle kernel paging request");
524 printk(" at virtual address %08lx\n",address); 524 printk(" at virtual address %08lx\n",address);
525 printk(KERN_ALERT " printing eip:\n"); 525 printk(KERN_ALERT " printing eip:\n");
526 printk("%08lx\n", regs->eip); 526 printk("%08lx\n", regs->eip);
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 400c2b41896e..1a565a9d2fa7 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -7,7 +7,7 @@
7#ifdef CONFIG_BUG 7#ifdef CONFIG_BUG
8#ifndef HAVE_ARCH_BUG 8#ifndef HAVE_ARCH_BUG
9#define BUG() do { \ 9#define BUG() do { \
10 printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ 10 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
11 panic("BUG!"); \ 11 panic("BUG!"); \
12} while (0) 12} while (0)
13#endif 13#endif
@@ -19,7 +19,7 @@
19#ifndef HAVE_ARCH_WARN_ON 19#ifndef HAVE_ARCH_WARN_ON
20#define WARN_ON(condition) do { \ 20#define WARN_ON(condition) do { \
21 if (unlikely((condition)!=0)) { \ 21 if (unlikely((condition)!=0)) { \
22 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ 22 printk("BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \
23 dump_stack(); \ 23 dump_stack(); \
24 } \ 24 } \
25} while (0) 25} while (0)
diff --git a/kernel/sched.c b/kernel/sched.c
index a5bd60453eae..7ffaabd64f89 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2873,7 +2873,7 @@ asmlinkage void __sched schedule(void)
2873 */ 2873 */
2874 if (likely(!current->exit_state)) { 2874 if (likely(!current->exit_state)) {
2875 if (unlikely(in_atomic())) { 2875 if (unlikely(in_atomic())) {
2876 printk(KERN_ERR "scheduling while atomic: " 2876 printk(KERN_ERR "BUG: scheduling while atomic: "
2877 "%s/0x%08x/%d\n", 2877 "%s/0x%08x/%d\n",
2878 current->comm, preempt_count(), current->pid); 2878 current->comm, preempt_count(), current->pid);
2879 dump_stack(); 2879 dump_stack();
@@ -6074,7 +6074,7 @@ void __might_sleep(char *file, int line)
6074 if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy) 6074 if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
6075 return; 6075 return;
6076 prev_jiffy = jiffies; 6076 prev_jiffy = jiffies;
6077 printk(KERN_ERR "Debug: sleeping function called from invalid" 6077 printk(KERN_ERR "BUG: sleeping function called from invalid"
6078 " context at %s:%d\n", file, line); 6078 " context at %s:%d\n", file, line);
6079 printk("in_atomic():%d, irqs_disabled():%d\n", 6079 printk("in_atomic():%d, irqs_disabled():%d\n",
6080 in_atomic(), irqs_disabled()); 6080 in_atomic(), irqs_disabled());