]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9d589e6f5f5df8431bc7ef4857db864ec4423794
treefd75e68b64617cfc044bd0bd834d0ff805030a57
parent6271457166009288ae9ee5b918cc43c45c48eae4
mac80211: fix monitor_sdata RCU/locking assertions

Since commit 31793ce79203 ("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: 31793ce79203 ("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