Skip to content

Commit 83a73cb

Browse files
Miriam-Rachelgregkh
authored andcommitted
wifi: mac80211: don't queue sdata::work for a non-running sdata
[ Upstream commit 20d5a0b ] 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 <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250306123626.1e02caf82640.I4949e71ed56e7186ed4968fa9ddff477473fa2f4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6114d2e commit 83a73cb

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 <johannes@sipsolutions.net>
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
*/
@@ -2184,8 +2184,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
21842184
ieee80211_reconfig_roc(local);
21852185

21862186
/* Requeue all works */
2187-
list_for_each_entry(sdata, &local->interfaces, list)
2188-
wiphy_work_queue(local->hw.wiphy, &sdata->work);
2187+
list_for_each_entry(sdata, &local->interfaces, list) {
2188+
if (ieee80211_sdata_running(sdata))
2189+
wiphy_work_queue(local->hw.wiphy, &sdata->work);
2190+
}
21892191
}
21902192

21912193
ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,

0 commit comments

Comments
 (0)