Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80c78c67 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: fix possible deadlock



It was possible to have a deadlock due to inverted
locking of local->iflist_mtx and
ath10k->conf_mutex.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent a783c770
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2581,7 +2581,8 @@ static int ath10k_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
	ar_iter.ar = ar;

	mutex_lock(&ar->conf_mutex);
	ieee80211_iterate_active_interfaces(hw, IEEE80211_IFACE_ITER_RESUME_ALL,
	ieee80211_iterate_active_interfaces_atomic(
		hw, IEEE80211_IFACE_ITER_RESUME_ALL,
		ath10k_set_rts_iter, &ar_iter);
	mutex_unlock(&ar->conf_mutex);

@@ -2622,7 +2623,8 @@ static int ath10k_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
	ar_iter.ar = ar;

	mutex_lock(&ar->conf_mutex);
	ieee80211_iterate_active_interfaces(hw, IEEE80211_IFACE_ITER_RESUME_ALL,
	ieee80211_iterate_active_interfaces_atomic(
		hw, IEEE80211_IFACE_ITER_RESUME_ALL,
		ath10k_set_frag_iter, &ar_iter);
	mutex_unlock(&ar->conf_mutex);