Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: rx: avoid RCU list traversal under mutex

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 <madhuparnabhowmik10@gmail.com>
Link: https://lore.kernel.org/r/20200223143302.15390-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Madhuparna Bhowmik and committed by
Johannes Berg
253216ff e3ae39ed

+1 -1
+1 -1
net/mac80211/rx.c
··· 4114 4114 4115 4115 lockdep_assert_held(&local->sta_mtx); 4116 4116 4117 - list_for_each_entry_rcu(sta, &local->sta_list, list) { 4117 + list_for_each_entry(sta, &local->sta_list, list) { 4118 4118 if (sdata != sta->sdata && 4119 4119 (!sta->sdata->bss || sta->sdata->bss != sdata->bss)) 4120 4120 continue;