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

From: Alexander Holler
Date: Mon Jun 08 2015 - 14:07:21 EST


Am 08.06.2015 um 13:27 schrieb Ingo Molnar:

* Alexander Holler <holler@xxxxxxxxxxxxx> 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 and which leaded to a reset of a system sometime after a wireless remote connected device was turned off. And it showed exactly where the problem existed. Maybe I should mention that almost a year after I've posted that patch, people still stumbled over the problem (and likely had the same hard time to find the reason for a sudden reboot without any warning).

I just want to make clear that a brutforce slogan like BUG_ON is bad is bad, especially as there are many people which just might repeat that slogan without thinking about what they are repeating.

Alexander Holler
--
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/