kernel-ark/drivers/char
Eric Dumazet de5e2ddf9b ipmi: proper spinlock initialization
Unloading ipmi module can trigger following error.  (if
CONFIG_DEBUG_SPINLOCK=y)

[ 9633.779590] BUG: spinlock bad magic on CPU#1, rmmod/7170
[ 9633.779606]  lock: f41f5414, .magic: 00000000, .owner:
<none>/-1, .owner_cpu: 0
[ 9633.779626] Pid: 7170, comm: rmmod Not tainted
2.6.36-rc7-11474-gb71eb1e-dirty #328
[ 9633.779644] Call Trace:
[ 9633.779657]  [<c13921cc>] ? printk+0x18/0x1c
[ 9633.779672]  [<c11a1f33>] spin_bug+0xa3/0xf0
[ 9633.779685]  [<c11a1ffd>] do_raw_spin_lock+0x7d/0x160
[ 9633.779702]  [<c1131537>] ? release_sysfs_dirent+0x47/0xb0
[ 9633.779718]  [<c1131b78>] ? sysfs_addrm_finish+0xa8/0xd0
[ 9633.779734]  [<c1394bac>] _raw_spin_lock_irqsave+0xc/0x20
[ 9633.779752]  [<f99d93da>] cleanup_one_si+0x6a/0x200 [ipmi_si]
[ 9633.779768]  [<c11305b2>] ? sysfs_hash_and_remove+0x72/0x80
[ 9633.779786]  [<f99dcf26>] ipmi_pnp_remove+0xd/0xf [ipmi_si]
[ 9633.779802]  [<c11f622b>] pnp_device_remove+0x1b/0x40

Fix this by initializing spinlocks in a smi_info_alloc() helper function,
right after memory allocation and clearing.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: David Miller <davem@davemloft.net>
Cc: Yinghai Lu <yinghai@kernel.org>
Acked-by: Corey Minyard <cminyard@mvista.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:04 -07:00
..
agp Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
hw_random llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ip2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2010-10-22 19:59:04 -07:00
ipmi ipmi: proper spinlock initialization 2010-10-26 16:52:04 -07:00
mwave Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
pcmcia Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
rio Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
tpm Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
xilinx_hwicap Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
.gitignore
amiserial.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
apm-emulation.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
applicom.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
applicom.h
bfin_jtag_comm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
bfin-otp.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
briq_panel.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
bsr.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
cd1865.h
consolemap.c
cp437.uni
cs5535_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
cyclades.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
ds1620.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dsp56k.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dtlk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
efirtc.c
epca.c epca: Kill the big kernel lock 2010-08-10 13:47:40 -07:00
epca.h
epcaconfig.h
generic_nvram.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
generic_serial.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
genrtc.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
hangcheck-timer.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
hpet.c hpet: kill BKL, add compat_ioctl 2010-09-15 21:01:40 +02:00
hvc_beat.c
hvc_console.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
hvc_console.h
hvc_irq.c
hvc_iseries.c
hvc_iucv.c [S390] hvc_iucv: do not call iucv_unregister if iucv_register failed 2010-10-25 16:10:17 +02:00
hvc_rtas.c
hvc_tile.c arch/tile: catch up on various minor cleanups. 2010-07-06 13:42:15 -04:00
hvc_udbg.c
hvc_vio.c
hvc_xen.c
hvcs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hvsi.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
i8k.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
isicom.c isicom: kill off the BKL 2010-08-10 13:47:40 -07:00
istallion.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
Kconfig add ttyprintk driver 2010-10-22 10:20:02 -07:00
keyboard.c Input: add support for large scancodes 2010-09-09 22:00:50 -07:00
lp.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
Makefile add ttyprintk driver 2010-10-22 10:20:02 -07:00
mbcs.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
mbcs.h
mem.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
misc.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
mmtimer.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
moxa.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
moxa.h
mspec.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
mxser.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
mxser.h
n_gsm.c drivers/char/n_gsm.c: add missing spin_unlock_irqrestore 2010-08-11 08:59:20 -07:00
n_hdlc.c tty: replace BKL with a new tty_lock 2010-08-10 13:47:43 -07:00
n_r3964.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
n_tty.c tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
nozomi.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
nsc_gpio.c
nvram.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
nwbutton.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
nwbutton.h
nwflash.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
pc8736x_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ppdev.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
ps3flash.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
pty.c tty: Remove __GFP_NOFAIL from tty_add_file() 2010-10-22 10:19:58 -07:00
ramoops.c char drivers: RAM oops/panic logger 2010-05-27 09:12:50 -07:00
random.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
raw.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
riscom8_reg.h
riscom8.c riscom8: kill use of lock_kernel 2010-08-10 13:47:40 -07:00
riscom8.h
rocket_int.h
rocket.c rocket: add a mutex_unlock() 2010-08-23 18:17:21 -07:00
rocket.h
rtc.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
scc.h
scx200_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
selection.c tty: remove tty_lock_nested 2010-08-10 13:47:44 -07:00
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
snsc_event.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
snsc.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
snsc.h
sonypi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
specialix_io8.h
specialix.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
stallion.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
sx.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
sx.h
sxboards.h
sxwindow.h
synclink_gt.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
synclink.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
synclinkmp.c tty: icount changeover for other main devices 2010-10-22 10:20:05 -07:00
sysrq.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-10-25 07:59:01 -07:00
tb0219.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
tlclk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
toshiba.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
tty_audit.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
tty_buffer.c tty: fix obsolete comment on tty_insert_flip_string_fixed_flag 2010-05-21 09:34:30 -07:00
tty_io.c tty: Make tiocgicount a handler 2010-10-22 10:20:04 -07:00
tty_ioctl.c tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
tty_ldisc.c tty: remove tty_lock_nested 2010-08-10 13:47:44 -07:00
tty_mutex.c tty: implement BTM as mutex instead of BKL 2010-08-10 13:47:44 -07:00
tty_port.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
ttyprintk.c add ttyprintk driver 2010-10-22 10:20:02 -07:00
uv_mmtimer.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
vc_screen.c vcs: invoke the vt update callback when /dev/vcs* is written to 2010-10-22 10:20:06 -07:00
viotape.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
virtio_console.c virtio: console: Disable lseek(2) for port file operations 2010-10-21 17:44:04 +10:30
vme_scc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vt_ioctl.c Input: use PIT_TICK_RATE in vt beep ioctl 2010-08-28 21:39:09 -07:00
vt.c vcs: invoke the vt update callback when /dev/vcs* is written to 2010-10-22 10:20:06 -07:00