lkml.org 
[lkml]   [2013]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty.
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?


\
 
 \ /
  Last update: 2013-05-22 11:21    [W:0.076 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site