Commit 52e88f5d authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] change WARN_ON back to "BUG: at ..."

WARN_ON() ever triggering is a kernel bug.  Do not try to paper over this
fact by suggesting to the user that this is 'only' a warning, as the
following recent commit does:

  commit 30e25b71
  Author: Jeremy Fitzhardinge <jeremy@goop.org>
  Date:   Fri Dec 8 02:36:24 2006 -0800

    [PATCH] Fix generic WARN_ON message

    A warning is a warning, not a BUG.

( it might make sense to rename BUG() to CRASH() and BUG_ON() to
  CRASH_ON(), but that does not change the fact that WARN_ON()
  signals a kernel bug. )

i and others objected to this change during lkml review:

  http://marc.theaimsgroup.com/?l=linux-kernel&m=116115160710533&w=2

still the change slipped upstream - grumble :)

Also, use the standard "BUG: " format to make it easier to grep logs and
to make it easier to google for kernel bugs.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 76598ebe
...@@ -35,7 +35,7 @@ struct bug_entry { ...@@ -35,7 +35,7 @@ struct bug_entry {
#define WARN_ON(condition) ({ \ #define WARN_ON(condition) ({ \
typeof(condition) __ret_warn_on = (condition); \ typeof(condition) __ret_warn_on = (condition); \
if (unlikely(__ret_warn_on)) { \ if (unlikely(__ret_warn_on)) { \
printk("WARNING at %s:%d %s()\n", __FILE__, \ printk("BUG: at %s:%d %s()\n", __FILE__, \
__LINE__, __FUNCTION__); \ __LINE__, __FUNCTION__); \
dump_stack(); \ dump_stack(); \
} \ } \
......
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