* Andrew Morton <akpm@xxxxxxxx> wrote:
Reuben Farrelly <reuben-lkml@xxxxxxxx> wrote:> Anyway, scary trace. It look like some spinlock is thought to be in theMe too.
> wrong state in schedule(). Send the .config, please.
Now online at http://www.reub.net/kernel/.config
BUG: spinlock recursion on CPU#0, swapper/0, c120d520 [<c01039ed>] dump_stack+0x19/0x20 [<c01d9af2>] spin_bug+0x42/0x54 [<c01d9bfa>] _raw_spin_lock+0x3e/0x84
[<c031d0ad>] _spin_lock+0x9/0x10 [<c031b9e9>] schedule+0x479/0xbc8
[<c0100cb4>] cpu_idle+0x88/0x8c [<c01002c1>] rest_init+0x21/0x28
[<c0442899>] start_kernel+0x151/0x158
[<c010020f>] 0xc010020f Kernel panic - not syncing: bad locking
The bug is in the new spinlock debugging code itself. Ingo, can you test that .config please?
couldnt reproduce it on an UP box, nor on an SMP/HT 2/4-way box, but it finally triggered on a 2-way SMP box.
the bug is that current->pid is not a unique identifier on SMP (doh!).
The patch below fixes the bug - which also happens to be a speedup for the debugging code, as the ->pid dereferencing does not have to be done anymore. Also, i've disabled the panicing for now.
Ingo