Skip to content

Commit 5ff6410

Browse files
committed
wifi: iwlwifi: mld: cancel mlo_scan_start_wk
mlo_scan_start_wk is not canceled on disconnection. In fact, it is not canceled anywhere except in the restart cleanup, where we don't really have to. This can cause an init-after-queue issue: if, for example, the work was queued and then drv_change_interface got executed. This can also cause use-after-free: if the work is executed after the vif is freed. Fixes: 9748ad8 ("wifi: iwlwifi: defer MLO scan after link activation") Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20260129212650.a36482a60719.I5bf64a108ca39dacb5ca0dcd8b7258a3ce8db74c@changeid
1 parent 1cac389 commit 5ff6410

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/wireless/intel/iwlwifi/mld/iface.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
5555

5656
ieee80211_iter_keys(mld->hw, vif, iwl_mld_cleanup_keys_iter, NULL);
5757

58-
wiphy_delayed_work_cancel(mld->wiphy, &mld_vif->mlo_scan_start_wk);
59-
6058
CLEANUP_STRUCT(mld_vif);
6159
}
6260

drivers/net/wireless/intel/iwlwifi/mld/mac80211.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,8 @@ static int iwl_mld_move_sta_state_down(struct iwl_mld *mld,
17591759
wiphy_work_cancel(mld->wiphy, &mld_vif->emlsr.unblock_tpt_wk);
17601760
wiphy_delayed_work_cancel(mld->wiphy,
17611761
&mld_vif->emlsr.check_tpt_wk);
1762+
wiphy_delayed_work_cancel(mld->wiphy,
1763+
&mld_vif->mlo_scan_start_wk);
17621764

17631765
iwl_mld_reset_cca_40mhz_workaround(mld, vif);
17641766
iwl_mld_smps_workaround(mld, vif, true);

0 commit comments

Comments
 (0)