lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] Add kernel config option for tweaking kernel behavior.
On Tue, 14 Apr 2020 18:14:51 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> If that WARN_ON() is a problem, then the people behind it should be
> appraised of it, and it should probably be removed. I'm assuming it
> was some kind of "I don't think this can happen, so if it does, I want
> to see how it happened" WARN_ON.

What I do (and feel everyone should too), is I only add a WARN_ON()
when I check something that I believe *can't* happen. If the WARN_ON()
triggers, it either means that there's a bug in the code (and needs a
fix), or the code design changed, in which case the WARN_ON() should be
either removed, or that code updated to handle the new change.

In any case, a WARN_ON() should always be investigated when hit.

The only time I've had issues with people is when I have some hardware
(i915) that triggers a WARN_ON() and I'm told that my hardware is buggy
(or I need a firmware update). In which case, I just manually remove
the WARN_ON() because the machine that triggers it is a test machine I
don't have the time to waste updating firmware on.

-- Steve

\
 
 \ /
  Last update: 2020-04-15 03:44    [W:0.051 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site