linux/drivers/char
Yinghai Lu 561f8182db ipmi: fix hardcoded ipmi device exit path warning
When modprobe.conf has
options ipmi_si type="kcs" ports=0xCA2 regspacings="4"

ipmi_si can be loaded properly, but when try to unload it get:

Sep 20 15:00:27 xx abrt: Kerneloops: Reported 1 kernel oopses to Abrt
Sep 20 15:00:27 xx abrtd: Directory 'kerneloops-1285020027-1' creation detected
Sep 20 15:00:27 xx abrtd: New crash /var/spool/abrt/kerneloops-1285020027-1, processing
Sep 20 15:01:09 xx kernel: ------------[ cut here ]------------
Sep 20 15:01:09 xx kernel: WARNING: at drivers/base/driver.c:262 driver_unregister+0x8a/0xa0()
Sep 20 15:01:09 xx kernel: Hardware name: Sun Fire x4800
Sep 20 15:01:09 xx kernel: Unexpected driver unregister!
Sep 20 15:01:09 xx kernel: Modules linked in: ipmi_si(-) ipmi_msghandler ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb3i iw_cxgb3 cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan tun kvm_intel kvm uinput sg ses enclosure ahci libahci pcspkr i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support igb dca i7core_edac edac_core ext3 jbd mbcache sd_mod crc_t10dif megaraid_sas [last unloaded: ipmi_devintf]
Sep 20 15:01:09 xx kernel: Pid: 10625, comm: modprobe Tainted: G        W   2.6.36-rc5-tip+ #6
Sep 20 15:01:09 xx kernel: Call Trace:
Sep 20 15:01:09 xx kernel: [<ffffffff810600df>] warn_slowpath_common+0x7f/0xc0
Sep 20 15:01:09 xx kernel: [<ffffffff810601d6>] warn_slowpath_fmt+0x46/0x50
Sep 20 15:01:09 xx kernel: [<ffffffff812ff60a>] driver_unregister+0x8a/0xa0
Sep 20 15:01:09 xx kernel: [<ffffffff812ae112>] pnp_unregister_driver+0x12/0x20
Sep 20 15:01:09 xx kernel: [<ffffffffa01d0327>] cleanup_ipmi_si+0x3c/0xa7 [ipmi_si]
Sep 20 15:01:09 xx kernel: [<ffffffff81099a60>] sys_delete_module+0x1a0/0x270
Sep 20 15:01:09 xx kernel: [<ffffffff814b7070>] ? do_page_fault+0x150/0x320
Sep 20 15:01:09 xx kernel: [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
Sep 20 15:01:09 xx kernel: ---[ end trace 0d1967161adcee0d ]---

We need to check if ipmi_pnp_driver is loaded before we try to unload it.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-22 17:22:40 -07:00
..
agp drm/i915,agp/intel: Add second set of PCI-IDs for B43 2010-09-17 08:22:30 +01:00
hw_random Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2010-09-07 14:35:16 -07:00
ip2 ip2: return -EFAULT on copy_to_user errors 2010-08-23 18:17:21 -07:00
ipmi ipmi: fix hardcoded ipmi device exit path warning 2010-09-22 17:22:40 -07:00
mwave mwave: fix read buffer overflow 2009-09-24 07:21:03 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-08-09 21:05:52 -07:00
rio 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
tpm tpm_tis: fix subsequent suspend failures 2010-07-26 10:25:45 +10:00
xilinx_hwicap of: Fix missing includes 2010-08-16 23:44:49 -06:00
.gitignore
amiserial.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
apm-emulation.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
applicom.c drivers/char/applicom.c: use memdup_user 2010-05-27 09:12:50 -07: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 const: constify remaining file_operations 2009-10-01 16:11:11 -07:00
briq_panel.c tty: replace BKL with a new tty_lock 2010-08-10 13:47:43 -07:00
bsr.c of/address: Clean up function declarations 2010-08-01 01:42:42 -06:00
cd1865.h
consolemap.c
cp437.uni
cs5535_gpio.c drivers: Remove BKL from cs5535_gpio 2009-10-14 17:36:48 +02:00
cyclades.c tty: introduce wait_event_interruptible_tty 2010-08-10 13:47:43 -07:00
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c
ds1620.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
dsp56k.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
dtlk.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
efirtc.c efirtc: explicitly set llseek to no_llseek 2009-12-16 07:19:59 -08:00
epca.c epca: Kill the big kernel lock 2010-08-10 13:47:40 -07:00
epca.h
epcaconfig.h
generic_nvram.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +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 drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
hangcheck-timer.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
hpet.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
hvc_beat.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-02-25 15:38:37 -08:00
hvc_console.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
hvc_console.h hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_irq.c
hvc_iseries.c Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
hvc_iucv.c Add param ops struct for hvc_iucv driver. 2010-08-11 23:04:16 +09:30
hvc_rtas.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_tile.c arch/tile: catch up on various minor cleanups. 2010-07-06 13:42:15 -04:00
hvc_udbg.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_vio.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
hvc_xen.c hvc_console: make the ops pointer const. 2010-02-24 14:22:32 +10:30
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 procfs: Push down the bkl from ioctl 2010-05-17 03:06:12 +02:00
isicom.c isicom: kill off the BKL 2010-08-10 13:47:40 -07:00
istallion.c tty: introduce wait_event_interruptible_tty 2010-08-10 13:47:43 -07:00
Kconfig pc8736x_gpio: depends on X86_32 2010-08-12 08:43:29 -07:00
keyboard.c tty: Move the vt_tty field from the vc_data into the standard tty_port 2010-08-10 13:47:42 -07:00
lp.c lp: move compat_ioctl handling into lp.c 2009-12-10 22:55:36 +01:00
Makefile tty: implement BTM as mutex instead of BKL 2010-08-10 13:47:44 -07:00
mbcs.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
mbcs.h
mem.c char: Mark /dev/zero and /dev/kmem as not capable of writeback 2010-09-22 09:48:47 +02:00
misc.c char: add WARN_ON() in misc_deregister() 2010-08-09 20:45:06 -07:00
mmtimer.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.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 tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
mxser.c mxser: remove unnesesary NULL check 2010-08-10 13:47:45 -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 tty: introduce wait_event_interruptible_tty 2010-08-10 13:47:43 -07:00
n_tty.c tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
nozomi.c kfifo: fix kfifo miss use of nozami.c 2010-08-11 08:59:23 -07:00
nsc_gpio.c
nvram.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
nwbutton.c
nwbutton.h
nwflash.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02:00
pc8736x_gpio.c drivers: Remove BKL from pc8736x_gpio 2009-10-14 17:36:52 +02:00
ppdev.c drivers/char/ppdev.c: use kasprintf 2010-05-27 09:12:50 -07:00
ps3flash.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
pty.c tty: fix fu_list abuse 2010-08-18 08:35:47 -04:00
ramoops.c char drivers: RAM oops/panic logger 2010-05-27 09:12:50 -07:00
random.c random: Reorder struct entropy_store to remove padding on 64bits 2010-07-31 19:58:00 +08:00
raw.c drivers: Push down BKL into various drivers 2010-05-17 05:27:41 +02: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 drivers: Remove BKL from scx200_gpio 2009-10-14 17:36:53 +02:00
selection.c tty: remove tty_lock_nested 2010-08-10 13:47:44 -07:00
ser_a2232.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
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
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 stallion: prune lock_kernel calls 2010-08-10 13:47:40 -07:00
sx.c tty: replace BKL with a new tty_lock 2010-08-10 13:47:43 -07:00
sx.h
sxboards.h
sxwindow.h
synclink_gt.c synclink: add mutex_unlock() on error path 2010-08-23 18:17:21 -07:00
synclink.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
synclinkmp.c tty: release BTM while sleeping in block_til_ready 2010-08-10 13:47:44 -07:00
sysrq.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
tb0219.c mips: Remove BKL from tb0219 2009-10-14 17:36:53 +02:00
tlclk.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
toshiba.c tosh: Use non bkl ioctl 2010-01-04 12:31:21 -08: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: fix tty_line must not be equal to number of allocated tty pointers in tty driver 2010-09-03 17:29: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
uv_mmtimer.c x86, UV: Fix RTC latency bug by reading replicated cachelines 2010-01-27 11:33:53 +01:00
vc_screen.c tty: replace BKL with a new tty_lock 2010-08-10 13:47:43 -07:00
viotape.c of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
virtio_console.c virtio: console: Prevent userspace from submitting NULL buffers 2010-09-21 10:54:01 +09: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 vt: Fix console corruption on driver hand-over. 2010-09-03 17:29:03 -07:00