Re: [PATCH] debug: Deprecate BUG_ON() use in new code, introduce CRASH_ON()

From: Alexey Dobriyan
Date: Mon Jun 08 2015 - 10:26:26 EST


Ingo Molnar wrote:

> These days a BUG_ON() is almost always fatal due to unreleased locks,
> plus we still don't print kernel crashes to the graphical console,
> so they are silent hard lockups in 99% of the cases.

Is it a regression?

I've just tested with "echo c >/proc/sysrq-trigger" and
kernel.panic_on_oops=1 and the box just hanged. But I clearly remember
it started to work at some point and it was a miracle. Recently a colleague
of mine show such graphical panic (most of it as always scrolled away BTW).

It's usual setup with i915 driver, X and fbconsole which is never used.

As for BUG_ON() I hope rule will be relaxed for "not under locks" situations
and something will be done with inevitable miryads of trivial patches.

Count them:

$ chgrep -e BUG_ON -w -n | wc -l
9660
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/