6a8171f261
Larry Finger reports following lockdep warning: [ INFO: possible circular locking dependency detected ] 2.6.31-rc6-wl #201 ------------------------------------------------------- rfkill/30578 is trying to acquire lock: (&(&priv->work)->work#2){+.+...}, at: [<ffffffff81051215>] __cancel_work_timer+0xd9/0x222 but task is already holding lock: (&priv->conf_mutex#2){+.+.+.}, at: [<ffffffffa064a024>] rtl8187_stop+0x31/0x364 [rtl8187] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&priv->conf_mutex#2){+.+.+.}: [<ffffffff81065957>] __lock_acquire+0x12d0/0x1614 [<ffffffff81065d54>] lock_acquire+0xb9/0xdd [<ffffffff8127c32f>] mutex_lock_nested+0x56/0x2a8 [<ffffffffa064a392>] rtl8187_work+0x3b/0xf2 [rtl8187] [<ffffffff81050758>] worker_thread+0x1fa/0x30a [<ffffffff81054ca5>] kthread+0x8f/0x97 [<ffffffff8100cb7a>] child_rip+0xa/0x20 [<ffffffffffffffff>] 0xffffffffffffffff -> #0 (&(&priv->work)->work#2){+.+...}: [<ffffffff8106568c>] __lock_acquire+0x1005/0x1614 [<ffffffff81065d54>] lock_acquire+0xb9/0xdd [<ffffffff8105124e>] __cancel_work_timer+0x112/0x222 [<ffffffff8105136b>] cancel_delayed_work_sync+0xd/0xf [<ffffffffa064a33f>] rtl8187_stop+0x34c/0x364 [rtl8187] [<ffffffffa0242866>] ieee80211_stop_device+0x29/0x61 [mac80211] [<ffffffffa0239194>] ieee80211_stop+0x476/0x530 [mac80211] [<ffffffff8120ce15>] dev_close+0x8a/0xac [<ffffffffa01d9fa7>] cfg80211_rfkill_set_block+0x4a/0x7a [cfg80211] [<ffffffffa01bf4f0>] rfkill_set_block+0x84/0xd9 [rfkill] [<ffffffffa01bfc31>] rfkill_fop_write+0xda/0x124 [rfkill] [<ffffffff810cf286>] vfs_write+0xae/0x14a [<ffffffff810cf3e6>] sys_write+0x47/0x6e [<ffffffff8100ba6b>] system_call_fastpath+0x16/0x1b [<ffffffffffffffff>] 0xffffffffffffffff The problem here is that rtl8187_stop, while helding priv->conf_mutex, runs cancel_delayed_work_sync on an workqueue that runs rtl8187_work, which also takes priv->conf_mutex lock. Move cancel_delayed_work_sync out of rtl8187_stop priv->conf_mutex locking region. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: John W. Linville <linville@tuxdriver.com> |
||
---|---|---|
.. | ||
ath | ||
b43 | ||
b43legacy | ||
hostap | ||
ipw2x00 | ||
iwlwifi | ||
iwmc3200wifi | ||
libertas | ||
libertas_tf | ||
orinoco | ||
p54 | ||
prism54 | ||
rt2x00 | ||
rtl818x | ||
wl12xx | ||
zd1211rw | ||
adm8211.c | ||
adm8211.h | ||
airo.c | ||
airo.h | ||
airo_cs.c | ||
arlan-main.c | ||
arlan-proc.c | ||
arlan.h | ||
at76c50x-usb.c | ||
at76c50x-usb.h | ||
atmel.c | ||
atmel.h | ||
atmel_cs.c | ||
atmel_pci.c | ||
i82586.h | ||
i82593.h | ||
Kconfig | ||
mac80211_hwsim.c | ||
Makefile | ||
mwl8k.c | ||
netwave_cs.c | ||
ray_cs.c | ||
ray_cs.h | ||
rayctl.h | ||
rndis_wlan.c | ||
strip.c | ||
wavelan.c | ||
wavelan.h | ||
wavelan.p.h | ||
wavelan_cs.c | ||
wavelan_cs.h | ||
wavelan_cs.p.h | ||
wl3501.h | ||
wl3501_cs.c | ||
zd1201.c | ||
zd1201.h |