diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2025-03-06 12:37:56 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-03-07 09:57:39 +0100 |
commit | 20d5a0b9cd0ccb32e886cf6baecf14936325bf10 (patch) | |
tree | cb02198ac2df68faef570533996ca1f8715cfd78 | |
parent | 43e04077170799d0e6289f3e928f727e401b3d79 (diff) | |
download | linux-20d5a0b9cd0ccb32e886cf6baecf14936325bf10.tar.gz linux-20d5a0b9cd0ccb32e886cf6baecf14936325bf10.tar.bz2 linux-20d5a0b9cd0ccb32e886cf6baecf14936325bf10.zip |
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: f8891461a277 ("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>
-rw-r--r-- | net/mac80211/util.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 7f02bd5891eb..fdda14c08e2b 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -6,7 +6,7 @@ * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * utilities for mac80211 */ @@ -2193,8 +2193,10 @@ int ieee80211_reconfig(struct ieee80211_local *local) ieee80211_reconfig_roc(local); /* Requeue all works */ - list_for_each_entry(sdata, &local->interfaces, list) - wiphy_work_queue(local->hw.wiphy, &sdata->work); + list_for_each_entry(sdata, &local->interfaces, list) { + if (ieee80211_sdata_running(sdata)) + wiphy_work_queue(local->hw.wiphy, &sdata->work); + } } ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP, |