cfg80211: fix a bunch of RCU issues in multi-bssid code
authorSara Sharon <sara.sharon@intel.com>
Fri, 4 Oct 2019 12:37:06 +0000 (15:37 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 7 Oct 2019 19:35:57 +0000 (21:35 +0200)
commit461c4c2b4c0731d7452bad4e77c0cdbdcea1804c
tree17ec48a63c1aa9d72ed5c50bc1e6abc65caa3afd
parent1399c59fa92984836db90538cf92397fe7caaa57
cfg80211: fix a bunch of RCU issues in multi-bssid code

cfg80211_update_notlisted_nontrans() leaves the RCU critical session
too early, while still using nontrans_ssid which is RCU protected. In
addition, it performs a bunch of RCU pointer update operations such
as rcu_access_pointer and rcu_assign_pointer.

The caller, cfg80211_inform_bss_frame_data(), also accesses the RCU
pointer without holding the lock.

Just wrap all of this with bss_lock.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20191004123706.15768-3-luca@coelho.fi
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c