Re: [PATCH 2/2] nvme: drop WARN_ON_ONCE on write_stream bounds check
From: Keith Busch
Date: Thu Jul 30 2026 - 10:39:29 EST
On Thu, Jul 30, 2026 at 04:04:03PM +0200, Greg Kroah-Hartman wrote:
> It's only the systems that have panic-on-warn enabled that need to worry
> about user-triggered calls to that macro, and those systems know what
> they are getting themselves into, including the huge number of CVE fixes
> they then need to be responsible for backporting :)
This is a bit of a rug pull. We've long held the pattern that WARN is an
appropriate macro for conditions that should never happen, but don't
leave the system in an unrecoverable or compromised state. For
unrecoverable conditions, use BUG. It has been a valuable tool for
debugging and bug reporting.
If this is the new way, can we get a WARN_NO_PANIC so that we can
replace every instance of WARN with it? Then we can delete WARN and
lighten the CVE load.
I'm not advocating for WARN's in paths triggered by buggy or malicious
users, but we don't need panic-on-warn to justify removing those cases
either.