tmp_suning_uos_patched/net/wireless
Luciano Coelho c10841ca72 cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex
There was a deadlock when rfkill-blocking a wireless interface,
because we were locking the rdev mutex on NETDEV_GOING_DOWN to stop
sched_scans that were eventually running.  The rfkill block code was
already holding a mutex under rdev:

kernel: =======================================================
kernel: [ INFO: possible circular locking dependency detected ]
kernel: 3.0.0-rc1-00049-g1fa7b6a #57
kernel: -------------------------------------------------------
kernel: kworker/0:1/4525 is trying to acquire lock:
kernel: (&rdev->mtx){+.+.+.}, at: [<ffffffff8164c831>] cfg80211_netdev_notifier_call+0x131/0x5b0
kernel:
kernel: but task is already holding lock:
kernel: (&rdev->devlist_mtx){+.+.+.}, at: [<ffffffff8164dcef>] cfg80211_rfkill_set_block+0x4f/0xa0
kernel:
kernel: which lock already depends on the new lock.

To fix this, add a new mutex specifically for sched_scan, to protect
the sched_scan_req element in the rdev struct, instead of using the
global rdev mutex.

Reported-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-05 14:42:36 -04:00
..
.gitignore
chan.c
core.c cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex 2011-07-05 14:42:36 -04:00
core.h cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex 2011-07-05 14:42:36 -04:00
db.txt
debugfs.c
debugfs.h
ethtool.c
ethtool.h
genregdb.awk
ibss.c
Kconfig
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c wireless: Fix warnings due to -Wunused-but-set-variable 2011-05-10 15:53:47 -04:00
lib80211.c
Makefile
mesh.c nl80211: New notification to discover mesh peer candidates. 2011-04-12 16:57:39 -04:00
mlme.c mac80211: Let userspace send action frames over mesh interfaces 2011-05-11 14:37:47 -04:00
nl80211.c cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex 2011-07-05 14:42:36 -04:00
nl80211.h cfg80211/nl80211: add support for scheduled scans 2011-05-11 15:12:26 -04:00
radiotap.c
reg.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-05-16 19:32:19 -04:00
reg.h
regdb.h
scan.c cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex 2011-07-05 14:42:36 -04:00
sme.c cfg80211: Use consistent BSS matching between scan and sme 2011-05-19 10:37:18 -04:00
sysfs.c nl80211/cfg80211: WoWLAN support 2011-05-05 14:59:19 -04:00
sysfs.h
util.c cfg80211: Use consistent BSS matching between scan and sme 2011-05-19 10:37:18 -04:00
wext-compat.c
wext-compat.h
wext-core.c
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c