Skip to content

Commit 8ca47eb

Browse files
Madhuparna Bhowmikjmberg-intel
authored andcommitted
mac80211: sta_info: Add lockdep condition for RCU list usage
The function sta_info_get_by_idx() uses RCU list primitive. It is called with local->sta_mtx held from mac80211/cfg.c. Add lockdep expression to avoid any false positive RCU list warnings. Signed-off-by: Madhuparna Bhowmik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 6cb5f3e commit 8ca47eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac80211/sta_info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
231231
struct sta_info *sta;
232232
int i = 0;
233233

234-
list_for_each_entry_rcu(sta, &local->sta_list, list) {
234+
list_for_each_entry_rcu(sta, &local->sta_list, list,
235+
lockdep_is_held(&local->sta_mtx)) {
235236
if (sdata != sta->sdata)
236237
continue;
237238
if (i < idx) {

0 commit comments

Comments
 (0)