lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 05/10] blktrace: upgrade warns to BUG_ON() on unexpected circmunstances
On Sun, 19 Apr 2020 23:07:30 +0000
Luis Chamberlain <mcgrof@kernel.org> wrote:

> On Sun, Apr 19, 2020 at 03:50:13PM -0700, Bart Van Assche wrote:
> > On 4/19/20 12:45 PM, Luis Chamberlain wrote:
> > > @@ -498,10 +498,7 @@ static struct dentry *blk_trace_debugfs_dir(struct blk_user_trace_setup *buts,
> > > struct dentry *dir = NULL;
> > > /* This can only happen if we have a bug on our lower layers */
> > > - if (!q->kobj.parent) {
> > > - pr_warn("%s: request_queue parent is gone\n", buts->name);
> > > - return NULL;
> > > - }
> > > + BUG_ON(!q->kobj.parent);
> >
> > Does the following quote from Linus also apply to this patch: "there is NO
> > F*CKING EXCUSE to knowingly kill the kernel." See also
> > https://lkml.org/lkml/2016/10/4/1.
>
> We can use WARN_ON() and keep the return NULL, sure.
>

Yes please. This is definitely not something that should kill the system.

-- Steve

\
 
 \ /
  Last update: 2020-04-21 01:22    [W:0.058 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site