Skip to contentSkip to conversation

BUG_* broken since 2.6.11-rc1 ...

PATCH Herbert Poetzl 1 participant 1 message Feb 27, 2005

lore
Share & tools
lore
#0 lore raw

Hi Folks!

couldn't believe it when I discovered that BUG_ON() and friends is broken (at least on x86) ... (while it was definitely working with 2.6.10 ;)

the following 'patch':

init/main.c renamed from init/main.c.orig +2 -0
@@ -684,6 +684,8 @@ static int init(void * unused)
 	 * trying to recover a really broken machine.
 	 */
 
+	BUG_ON(0==0);
+
 	if (execute_command)
 		run_init_process(execute_command);
 

results in this oops:
(look at the filename and linenumber ;)

Freeing unused kernel memory: 244k freed

------------[ cut here ]------------
kernel BUG at <bad filename>:9377!
invalid operand: 0000 [#1]
PREEMPT SMP 
Modules linked in:
CPU:    1
EIP:    0060:[<c0100415>]    Not tainted VLI
EFLAGS: 00010296   (2.6.11-rc1) 

EIP is at init+0xf5/0x1a0
eax: 00000002 ebx: c04ed91c ecx: 00000001 edx: 00000001
esi: 00000000 edi: 00000000 ebp: 00000000 esp: c2113fdc
ds: 007b es: 007b ss: 0068
Process swapper (pid: 1, threadinfo=c2113000 task=c2114a80)

Stack: 00000000 00000002 00000000 c0100320 00000000 c0101375 00000000 00000000 
       00000000 
Call Trace:
 [<c0100320>] init+0x0/0x1a0
 [<c0101375>] kernel_thread_helper+0x5/0x10
Code: 00 00 89 54 24 08 89 44 24 04 e8 97 f8 05 00 85 c0 78 6d c7 04 24 00 00 0  <0>Kernel panic - not syncing: Attempted to kill init!

this is still true/valid for 2.6.11-rc5 ...

best,
Herbert