On 05/22/2013 05:11 PM, Peter Zijlstra wrote:
> On Mon, May 20, 2013 at 03:48:53PM +0800, Chen Gang wrote:
>> > 
>> > When neither CONFIG_BUG nor HAVE_ARCH_BUG is defined, need let function
>> > return failure value ('NULL') instead of random value.
> What will such a kernel do? Happily continue running whenever we hit a
> BUG? that seems like a particularly bad idea. Should we not have a stub
> BUG() function like:
> 
> void BUG(void) __attribute__((noreturn))
> {
>       local_irq_disable();
>       while (1) ;
> }
> 
> Which would at least halt things?
> 
> 

At least for me, it is a good idea. :-)

In menuconfig we can set !CONFIG_BUG and !HAVE_ARCH_BUG manually under
any architectures:

  "> General setup > Configure standard kernel features (expert users) > BUG() 
Support"

So I think, we really need your patch.


Thanks.
-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to