public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix generic WARN_ON message
Date: Thu, 19 Oct 2006 04:40:33 +1000	[thread overview]
Message-ID: <45367521.4080209@yahoo.com.au> (raw)
In-Reply-To: <45367350.4070902@goop.org>

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 

  reply	other threads:[~2006-10-18 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18  2:23 [PATCH] Fix generic WARN_ON message Jeremy Fitzhardinge
2006-10-18  5:55 ` Ingo Molnar
2006-10-18 18:32   ` Jeremy Fitzhardinge
2006-10-18 18:40     ` Nick Piggin [this message]
2006-10-25 10:04   ` Pavel Machek
2006-10-25 20:55     ` Steven Rostedt
2006-10-25 21:42       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45367521.4080209@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox