mac80211: fix monitor_sdata RCU/locking assertions
authorJohannes Berg <johannes.berg@intel.com>
Fri, 12 Nov 2021 12:51:44 +0000 (13:51 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Nov 2021 09:55:55 +0000 (10:55 +0100)
commit6dd2360334f3cb3b45fc1b8194c670090474b87c
treefd75e68b64617cfc044bd0bd834d0ff805030a57
parentf6ab25d41b18f3d26883cb9c20875e1a85c4f05b
mac80211: fix monitor_sdata RCU/locking assertions

Since commit a05829a7222e ("cfg80211: avoid holding the RTNL when
calling the driver") we've not only been protecting the pointer
to monitor_sdata with the RTNL, but also with the wiphy->mtx. This
is relevant in a number of lockdep assertions, e.g. the one we hit
in ieee80211_set_monitor_channel(). However, we're now protecting
all the assignments/dereferences, even the one in interface iter,
with the wiphy->mtx, so switch over the lockdep assertions to that
lock.

Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20211112135143.cb8e8ceffef3.Iaa210f16f6904c8a7a24954fb3396da0ef86ec08@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/iface.c
net/mac80211/util.c