workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Alex Elder <elder@linaro.org>,
	corbet@lwn.net, workflows@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation: coding-style: don't encourage WARN*()
Date: Mon, 15 Apr 2024 01:46:20 -0700	[thread overview]
Message-ID: <ZhzpXOUeldwAzXxY@infradead.org> (raw)
In-Reply-To: <2024041544-fester-undead-7949@gregkh>

On Mon, Apr 15, 2024 at 10:35:21AM +0200, Greg KH wrote:
> On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote:
> > No, this advice is wronger than wrong.  If you set panic_on_warn you
> > get to keep the pieces.  
> > 
> 
> But don't add new WARN() calls please, just properly clean up and handle
> the error.  And any WARN() that userspace can trigger ends up triggering
> syzbot reports which also is a major pain, even if you don't have
> panic_on_warn enabled.

Important distinction here:  WARN_ON_ONCE is for internal error
checking and absolutely intentional, and does not replace error
handling, that's why it passes the error value through.  OF course
it should not be trigger by user action.

> And I think the "do not use panic_on_warn" recommendation has been
> ignored, given the huge use of it by vendors who have enabled it (i.e.
> all Samsung phones and cloud servers).

Sucks for them.


  reply	other threads:[~2024-04-15  8:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 17:08 Alex Elder
2024-04-14 19:48 ` Laurent Pinchart
2024-04-14 20:06   ` Alex Elder
2024-04-15  5:21   ` Greg KH
2024-04-15  8:25     ` Laurent Pinchart
2024-04-15  8:33       ` Greg KH
2024-04-15  8:42         ` Laurent Pinchart
2024-04-15  5:22 ` Greg KH
2024-04-15  8:07 ` Christoph Hellwig
2024-04-15  8:35   ` Greg KH
2024-04-15  8:46     ` Christoph Hellwig [this message]
2024-04-15 16:26     ` Kees Cook
2024-04-18 15:57       ` Jason Gunthorpe
2024-04-18 16:14 ` Eric Biggers
2024-04-18 17:12   ` Kees Cook
2024-04-18 22:33   ` John Hubbard
2024-04-19  7:16 ` David Hildenbrand

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=ZhzpXOUeldwAzXxY@infradead.org \
    --to=hch@infradead.org \
    --cc=corbet@lwn.net \
    --cc=elder@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=workflows@vger.kernel.org \
    /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