Skip to content

Commit 68a7894

Browse files
egrumbachgregkh
authored andcommitted
wifi: iwlwifi: mvm: take the mutex before running link selection
[ Upstream commit cd6f46c ] iwl_mvm_select_links is called by the link selection worker and it requires the mutex. Take it in the link selection worker. This logic used to run from iwl_mvm_rx_umac_scan_complete_notif which had the mvm->mutex held. This was changed to run in a worker holding the wiphy mutex, but we also need the mvm->mutex. Fixes: 2e194ef ("wifi: iwlwifi: mvm: Fix race in scan completion") Signed-off-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Ilan Peer <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.0cacecd5db1e.Iaca38a078592b69bdd06549daf63408ccf1810e4@changeid Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ac746de commit 68a7894

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-0
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,10 +1190,12 @@ static void iwl_mvm_trig_link_selection(struct wiphy *wiphy,
11901190
struct iwl_mvm *mvm =
11911191
container_of(wk, struct iwl_mvm, trig_link_selection_wk);
11921192

1193+
mutex_lock(&mvm->mutex);
11931194
ieee80211_iterate_active_interfaces(mvm->hw,
11941195
IEEE80211_IFACE_ITER_NORMAL,
11951196
iwl_mvm_find_link_selection_vif,
11961197
NULL);
1198+
mutex_unlock(&mvm->mutex);
11971199
}
11981200

11991201
static struct iwl_op_mode *

0 commit comments

Comments
 (0)