aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2026-07-14 17:02:11 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2026-07-15 20:52:44 +0300
commitc99bc4d4e0ba6f4661b2b914c96a597d26e7cc05 (patch)
treedccd8cf924b904c6545b1d984e56b671ff6e3ef1
parentwifi: iwlwifi: mvm: validate monitor notif link_id (diff)
wifi: iwlwifi: mld: cancel wiphy work before freeing wiphy
When we fail to load the fw during op-mode start, we purge the list of the async handlers but we don't cancel the work. Same when we stop the op-mode. Before freeing wiphy, we need to cancel/flush any pending wiphy work, otherwise the work will fire with a freed memory. cfg80211 will do it anyway, but it will warn. Cancel the work in those cases. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20260714165826.07aa49f755a2.I734a27b1b0eeb5b0e821aee3318fee8dc0a6bc03@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/mld.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wireless/intel/iwlwifi/mld/mld.c
index 78c78cf891cd..5a6c9ab20fd6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c
@@ -446,6 +446,8 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
}
if (ret) {
+ /* wiphy memory is about to be freed, we should cancel any pending work */
+ wiphy_work_cancel(mld->wiphy, &mld->async_handlers_wk);
wiphy_unlock(mld->wiphy);
rtnl_unlock();
goto err;
@@ -511,6 +513,7 @@ iwl_op_mode_mld_stop(struct iwl_op_mode *op_mode)
iwl_mld_thermal_exit(mld);
wiphy_lock(mld->wiphy);
+ wiphy_work_cancel(mld->wiphy, &mld->async_handlers_wk);
iwl_mld_low_latency_stop(mld);
iwl_mld_deinit_time_sync(mld);
wiphy_unlock(mld->wiphy);