Skip to content

Commit d2a4901

Browse files
Madhuparna Bhowmikgregkh
authored andcommitted
mac80211: rx: avoid RCU list traversal under mutex
[ Upstream commit 253216f ] local->sta_mtx is held in __ieee80211_check_fast_rx_iface(). No need to use list_for_each_entry_rcu() as it also requires a cond argument to avoid false lockdep warnings when not used in RCU read-side section (with CONFIG_PROVE_RCU_LIST). Therefore use list_for_each_entry(); Signed-off-by: Madhuparna Bhowmik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 4f1547a commit d2a4901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3841,7 +3841,7 @@ void __ieee80211_check_fast_rx_iface(struct ieee80211_sub_if_data *sdata)
38413841

38423842
lockdep_assert_held(&local->sta_mtx);
38433843

3844-
list_for_each_entry_rcu(sta, &local->sta_list, list) {
3844+
list_for_each_entry(sta, &local->sta_list, list) {
38453845
if (sdata != sta->sdata &&
38463846
(!sta->sdata->bss || sta->sdata->bss != sdata->bss))
38473847
continue;

0 commit comments

Comments
 (0)