remarkable-linux/net/wireless
Johannes Berg 0ff6ce7b36 cfg80211: fix deadlock
When removing an interface with nl80211, cfg80211 will
deadlock in the netdev notifier because we're already
holding rdev->mtx and try to acquire it again to verify
the scan has been done.

This bug was introduced by my patch
"cfg80211: check for and abort dangling scan requests".

To fix this, move the dangling scan request check into
wiphy_unregister(). This will not be able to catch all
cases right away, but if the scan problem happens with
a manual ifdown or so it will be possible to remedy it
by removing the module/device.

Additionally, add comments about the deadlock scenario.

Reported-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:56 -04:00
..
chan.c cfg80211: fix locking for SIWFREQ 2009-08-14 09:13:51 -04:00
core.c cfg80211: fix deadlock 2009-08-20 11:35:56 -04:00
core.h cfg80211: check for and abort dangling scan requests 2009-08-14 09:14:07 -04:00
debugfs.c cfg80211: clean up naming once and for all 2009-07-10 15:02:33 -04:00
debugfs.h cfg80211: clean up naming once and for all 2009-07-10 15:02:33 -04:00
ibss.c cfg80211: validate channel settings across interfaces 2009-08-14 09:13:42 -04:00
Kconfig cfg80211: implement iwpower 2009-07-10 15:01:51 -04:00
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
Makefile cfg80211: validate channel settings across interfaces 2009-08-14 09:13:42 -04:00
mlme.c cfg80211: use reassociation when possible 2009-08-14 09:13:43 -04:00
nl80211.c cfg80211: fix locking for SIWFREQ 2009-08-14 09:13:51 -04:00
nl80211.h cfg80211: fix locking 2009-07-10 15:02:32 -04:00
radiotap.c
reg.c trivial: remove duplicate "different" from comment 2009-08-14 09:14:02 -04:00
reg.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-08-12 17:44:53 -07:00
scan.c cfg80211: check for and abort dangling scan requests 2009-08-14 09:14:07 -04:00
sme.c cfg80211: fix alignment problem in scan request 2009-08-14 09:13:44 -04:00
sysfs.c
sysfs.h
util.c mac80211: Use 3-address format for mesh broadcast frames. 2009-08-14 09:14:00 -04:00
wext-compat.c cfg80211: export cfg80211_wext_siwfreq 2009-08-20 11:33:09 -04:00
wext-compat.h cfg80211: validate channel settings across interfaces 2009-08-14 09:13:42 -04:00
wext-sme.c cfg80211: fix locking for SIWFREQ 2009-08-14 09:13:51 -04:00
wext.c wext: remove extra return on wireless_nlevent_init() 2009-08-04 16:43:20 -04:00