Re: [PATCH 2/2] nvme: drop WARN_ON_ONCE on write_stream bounds check
From: Keith Busch
Date: Thu Jul 30 2026 - 15:38:19 EST
On Thu, Jul 30, 2026 at 05:02:32PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jul 30, 2026 at 08:27:07AM -0600, Keith Busch wrote:
> > 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.
>
> Sure, that's fine, just don't have such a path that a user can trigger,
> and all is good. syzbot has been dealing with this for years, it's not
> a rug-pull at all.
I think we're all on board that the kernel and drivers should fix their
existing WARN's in user triggerable paths to something that doesn't
raise that alarm. It's just that WARN in general can now mean "panic",
and that's concerning with how we're supposed to use it.