lkml.org 
[lkml]   [2018]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()
On Thu, 1 Nov 2018 13:21:12 +0100 (CET)
Thomas Gleixner <tglx@linutronix.de> wrote:

> Mathieu,
>
> On Thu, 1 Nov 2018, Mathieu Desnoyers wrote:
>
> > It is encouraged to warn and return rather than use BUG_ON() when
> > the condition can be recovered from in ways that are more graceful than
> > halting the whole system.
>
> You're failing to desribe how that graceful recovery works.
>

I think the graceful recovery is to simply return:

if (WARN_ON(cond))
return;

is better than just

BUG_ON(cond);

As that's what Linus made pretty clear at the Maintainer's Summit.

-- Steve

\
 
 \ /
  Last update: 2018-11-01 19:46    [W:0.932 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site