Re: [PATCH] Fix generic WARN_ON message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux