lkml.org 
[lkml]   [2006]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix generic WARN_ON message
Jeremy Fitzhardinge wrote:
> Ingo Molnar wrote:
>
>> Firstly, most WARN_ON()s are /bugs/, not warnings ... If it's a real
>> warning, a KERN_INFO printk should be done.
>>
>
>
> It seems to me that either the warnings are really bugs, in which case
> they should be using BUG/BUG_ON, or they're not really bugs, in which
> case they should be presented differently.

No. A BUG() will terminate the current process which, aside from the
loss of userspace data, can tangle up the kernel badly and deadlock
or panic it.

If a bug can be fixed up or otherwise will not result in unstable
behaviour with continued operation, then it should be a WARN.

>
>> Secondly, the reason i changed it to the 'BUG: ...' format is that i
>> tried to make it easier for automated tools (and for users) to figure
>> out that a kernel bug happened.
>>
>
>
> Well, are they bugs or not? I think people are more confused by the
> "BUG" prefix and stacktrace than helped by it (even an experienced eye
> will glance-parse a BUG+stack trace as a serious oops-level problem
> rather than a warning).

Definitely a bug. If the condition is not a bug then the code calling
WARN is, so it is a bug no matter how you look at it ;)

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-18 20:43    [W:2.464 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site