Skip to content

Commit 20d5a0b

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: mac80211: don't queue sdata::work for a non-running sdata
The worker really shouldn't be queued for a non-running interface. Also, if ieee80211_setup_sdata is called between queueing and executing the wk, it will be initialized, which will corrupt wiphy_work_list. Fixes: f889146 ("mac80211: do not start any work during reconfigure flow") Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://patch.msgid.link/20250306123626.1e02caf82640.I4949e71ed56e7186ed4968fa9ddff477473fa2f4@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 43e0407 commit 20d5a0b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

net/mac80211/util.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright 2007 Johannes Berg <[email protected]>
77
* Copyright 2013-2014 Intel Mobile Communications GmbH
88
* Copyright (C) 2015-2017 Intel Deutschland GmbH
9-
* Copyright (C) 2018-2024 Intel Corporation
9+
* Copyright (C) 2018-2025 Intel Corporation
1010
*
1111
* utilities for mac80211
1212
*/
@@ -2193,8 +2193,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
21932193
ieee80211_reconfig_roc(local);
21942194

21952195
/* Requeue all works */
2196-
list_for_each_entry(sdata, &local->interfaces, list)
2197-
wiphy_work_queue(local->hw.wiphy, &sdata->work);
2196+
list_for_each_entry(sdata, &local->interfaces, list) {
2197+
if (ieee80211_sdata_running(sdata))
2198+
wiphy_work_queue(local->hw.wiphy, &sdata->work);
2199+
}
21982200
}
21992201

22002202
ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,

0 commit comments

Comments
 (0)