lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON()

* Alexander Holler <holler@ahsoftware.de> wrote:

> Am 08.06.2015 um 13:27 schrieb Ingo Molnar:
> >
> >* Alexander Holler <holler@ahsoftware.de> wrote:
> >
> >>>I am pretty certain that Greg would have applied such a patch in an eye blink.
> >>
> >>As you've said it, *probably*. But such a simple exit path as you're proposing
> >>doesn't always exist. [...]
> >
> >As I said it's case by case. I discussed your example (which was a deficient patch
> >for multiple reasons) but we'd be wasting everyone's time by discussion
> >hypothethical situations.
>
> Sure it was a deficient patch, but still better than what existed for a year
> long in the kernel [...]

... but it was still worse than the simple solution I suggested:

if (WARN_ON_ONCE(port->itty))
return;

again, the BUG_ON() you wanted to introduce was wrong on multiple grounds, then
and now. Why are you still arguing about this?

> I just want to make clear that a brutforce slogan like BUG_ON is bad is bad,

I pointed out specific cases where a BUG_ON() is the right solution. They are
rare. Stop misrepresenting my words.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-06-08 22:21    [W:0.044 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site