Re: [PATCH] return hidden bug

From: Rik van Riel
Date: Mon Oct 22 2007 - 11:19:21 EST


On Mon, 22 Oct 2007 12:30:00 +0300
"Pekka Enberg" <penberg@xxxxxxxxxxxxxx> wrote:
> On 10/22/07, Rik van Riel <riel@xxxxxxxxxx> wrote:
> > BUG() will terminate the process that runs into it, so you can
> > just remove the return alltogether. If BUG() is hit, the return
> > will never be reached.
>
> This isn't true when CONFIG_BUG is disabled (in embedded builds, for
> example).

*blink*

I guess people who disable CONFIG_BUG really choose to shoot themselves
in the foot when something bad happens. The kernel is full of error
paths where the current thread really should not be continuing.

Oh well...

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
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/