diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-08-27 09:49:40 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-08-28 12:39:29 +0200 |
commit | ac35180032fbc5d80b29af00ba4881815ceefcb6 (patch) | |
tree | 3e46578a45a5fa4c5baa02836e23ad7d8d22eeda /net/mac80211/chan.c | |
parent | d07e1f5c745058d1805e7d8042b9a326b120cb6e (diff) |
wifi: mac80211: fix RCU list iterations
There are a number of places where RCU list iteration is
used, but that aren't (always) called with RCU held. Use
just list_for_each_entry() in most, and annotate iface
iteration with the required locks.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240827094939.ed8ac0b2f897.I8443c9c3c0f8051841353491dae758021b53115e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r-- | net/mac80211/chan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index e8567723e94d..b72e4036526b 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -286,7 +286,9 @@ ieee80211_get_max_required_bw(struct ieee80211_link_data *link) enum nl80211_chan_width max_bw = NL80211_CHAN_WIDTH_20_NOHT; struct sta_info *sta; - list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { + lockdep_assert_wiphy(sdata->local->hw.wiphy); + + list_for_each_entry(sta, &sdata->local->sta_list, list) { if (sdata != sta->sdata && !(sta->sdata->bss && sta->sdata->bss == sdata->bss)) continue; |