[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON()
Am 08.06.2015 um 10:08 schrieb Richard Weinberger:
> On Mon, Jun 8, 2015 at 9:40 AM, Alexander Holler <> wrote:
>> Am 08.06.2015 um 09:12 schrieb Ingo Molnar:
>>> * Linus Torvalds <> wrote:
>>>> Stop with the random BUG_ON() additions.
>>> Yeah, so I propose the attached patch which attempts to resist new
>>> BUG_ON()
>>> additions.
>> As this reminded me at flame I received once from a maintainer because I
>> wanted to avoid a desastrous memory corruption by using a BUG_ON().
> Reference?

To explain: The bug already existed for several releases and the memory
corruption was that desatrous that it even leaded here to hard resets of
systems without any oops. And fixing it needed several more releases
(another year).

And in the above mentioned case and the kernel config settings I use(d),
only the wronggoing thread was killed by the BUG_ON (I proposed) before
it had the chance to corrupt the memory.

Maybe someone could clarify what Greg meant with "something _really_
bad", because in my humble opionion there aren't much more worse things
than memory corruptions (e.g. by wrong pointers, use after free or
similiar stuff) if that happens inside the kernel. The consequences of
such are almost always unpredictable and therefor I would and likely
will ever prefer a controlled shutdown, reset or similiar instead of
leaving a system running with corrupted memory. Regardless what any
maintainer will say.


Alexander Holler

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