linux-stable/net/wireless
Johannes Berg 79ea1e12c0 cfg80211: fix management registrations deadlock
Lockdep reports that we may deadlock because we take the RTNL on
the work struct, but flush it under RTNL. Clearly, it's correct.
In practice, this can happen when doing rfkill on an active device.

Fix this by moving the work struct to the wiphy (registered dev)
layer, and iterate over all the wdevs inside there. This then
means we need to track which one of them has work to do, so we
don't update to the driver for all wdevs all the time.

Also fix a locking bug I noticed while working on this - the
registrations list is iterated as if it was an RCU list, but it
isn't handle that way - and we need to lock now for the update
flag anyway, so remove the RCU.

Fixes: 6cd536fe62 ("cfg80211: change internal management frame registration API")
Reported-by: Markus Theil <markus.theil@tu-ilmenau.de>
Reported-and-tested-by: Kenneth R. Crudup <kenny@panix.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200604120420.b1dc540a7e26.I55dcca56bb5bdc5d7ad66a36a0b42afd7034d8be@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-06-05 09:22:00 +02:00
..
certs cfg80211: ship certificates as hex files 2017-12-19 09:28:01 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
ap.c cfg80211: call disconnect_wk when AP stops 2019-02-01 11:12:50 +01:00
chan.c cfg80211: treat 6 GHz channels as valid regardless of capability 2020-05-31 11:27:08 +02:00
core.c cfg80211: fix management registrations deadlock 2020-06-05 09:22:00 +02:00
core.h cfg80211: fix management registrations deadlock 2020-06-05 09:22:00 +02:00
debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ethtool.c cfg80211: check wiphy driver existence for drvinfo report 2020-02-07 12:53:26 +01:00
ibss.c cfg80211: ibss: use 11a mandatory rates for 6GHz band operation 2019-08-21 10:54:57 +02:00
Kconfig cfg80211: fix CFG82011_CRDA_SUPPORT still mentioning internal regdb 2020-05-27 10:03:27 +02:00
lib80211.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
lib80211_crypt_ccmp.c lib80211: use crypto API ccm(aes) transform for CCMP processing 2019-07-26 13:22:47 +02:00
lib80211_crypt_tkip.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
lib80211_crypt_wep.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
Makefile wireless: Skip directory when generating certificates 2019-05-14 10:27:57 +02:00
mesh.c nl80211: Add SOCKET_OWNER support to JOIN_MESH 2018-03-29 10:38:24 +02:00
mlme.c cfg80211: fix management registrations deadlock 2020-06-05 09:22:00 +02:00
nl80211.c cfg80211: support bigger kek/kck key length 2020-05-31 11:27:24 +02:00
nl80211.h nl80211: link recursive netlink nested policy 2020-04-30 17:51:41 -07:00
ocb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
of.c
pmsr.c nl80211: link recursive netlink nested policy 2020-04-30 17:51:41 -07:00
radiotap.c docs: networking: convert radiotap-headers.txt to ReST 2020-04-30 12:56:37 -07:00
rdev-ops.h nl80211: add ability to report TX status for control port TX 2020-05-27 10:02:04 +02:00
reg.c cfg80211: express channels with a KHz component 2020-04-24 12:33:43 +02:00
reg.h net: Fix various misspellings of "connect" 2019-10-28 13:41:59 -07:00
scan.c cfg80211: express channels with a KHz component 2020-04-24 12:33:43 +02:00
sme.c nl80211: really allow client-only BIGTK support 2020-05-31 11:26:05 +02:00
sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 432 2019-06-05 17:37:16 +02:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c
trace.h nl80211: add ability to report TX status for control port TX 2020-05-27 10:02:04 +02:00
util.c nl80211: really allow client-only BIGTK support 2020-05-31 11:26:05 +02:00
wext-compat.c cfg80211: initialize on-stack chandefs 2019-10-01 17:56:18 +02:00
wext-compat.h treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
wext-core.c wireless: wext: avoid gcc -O3 warning 2020-01-15 09:52:20 +01:00
wext-priv.c
wext-proc.c proc: introduce proc_create_net{,_data} 2018-05-16 07:24:30 +02:00
wext-sme.c cfg80211: wext: avoid copying malformed SSIDs 2019-10-04 14:04:08 +02:00
wext-spy.c