Red Hat Bugzilla – Bug 190592
spinlock bad magic init'ing udev
Last modified: 2007-11-30 17:11:31 EST
Description of problem:
Starting udev: BUG: spinlock bad magic on CPU#0, events/0/5 (Not tainted)
lock: ffff810037c90280, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Kernel panic - not syncing: bad locking
Version-Release number of selected component (if applicable):
kernel builds 2181 & 2185
Most of the time it locks up. Adding dontpanic to kernel boot leads to spinlock
lockup on CPU#0. It sometimes boots though.
Steps to Reproduce:
Locks up requiring a power cycle to get going again.
I modified the start_udev script to find out what is happening. It seems that
calling udevtrigger is the culprit. If I add --dry-run, then I do not get the
spinlock bad magic and boot procedes. Not everything works, though. I am trying
to narrow down the subsystem more but I don't know exactly how. There's about
179 events getting replayed. Any ideas ?
I modified the kernel a little to get some info. The call chain seems to be
I also added a printk( "%s", dev->name) to line 895 of netdevice.h. When it
fails to boot, it outputs "eth%d <0>". When bootup succeeds, it prints "eth0 <6>
This seems like there is a race where sometimes it inited and sometimes its not.
Probably needs some sync mechanism. Does this help narrow things down any?
Created attachment 128706 [details]
I see what's going on here - bcm43xx_attach_board() does
schedule_work(), causing execution of ieee80211softmac_assoc_work()
and does that before the caller of that sucker gets to registering
net_dev. I'm not familiar with ieee80211 code, so suggested variant
may be BS and definitely needs an ACK from somebody who knows the
area; said that, try the patch attached above and see what happens.
*** This bug has been marked as a duplicate of 190776 ***