Skip to content

Commit 6e80006

Browse files
Baochen Qiangopsiff
authored andcommitted
wifi: ath11k: fix sleeping-in-atomic in ath11k_mac_op_set_bitrate_mask()
stable inclusion from stable-v6.12.42 category: bugfix CVE: CVE-2025-39732 [ Upstream commit 65c12b1 ] ath11k_mac_disable_peer_fixed_rate() is passed as the iterator to ieee80211_iterate_stations_atomic(). Note in this case the iterator is required to be atomic, however ath11k_mac_disable_peer_fixed_rate() does not follow it as it might sleep. Consequently below warning is seen: BUG: sleeping function called from invalid context at wmi.c:304 Call Trace: <TASK> dump_stack_lvl __might_resched.cold ath11k_wmi_cmd_send ath11k_wmi_set_peer_param ath11k_mac_disable_peer_fixed_rate ieee80211_iterate_stations_atomic ath11k_mac_op_set_bitrate_mask.cold Change to ieee80211_iterate_stations_mtx() to fix this issue. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Fixes: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> Link: https://patch.msgid.link/20250603-ath11k-use-non-atomic-iterator-v1-1-d75762068d56@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 9c0e3144924c7db701575a73af341d33184afeaf) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Conflicts: drivers/net/wireless/ath/ath11k/mac.c
1 parent fcdcccd commit 6e80006

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • drivers/net/wireless/ath/ath11k

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8214,9 +8214,9 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
82148214
arvif->vdev_id, ret);
82158215
return ret;
82168216
}
8217-
ieee80211_iterate_stations_atomic(ar->hw,
8218-
ath11k_mac_disable_peer_fixed_rate,
8219-
arvif);
8217+
ieee80211_iterate_stations_mtx(ar->hw,
8218+
ath11k_mac_disable_peer_fixed_rate,
8219+
arvif);
82208220
} else if (ath11k_mac_bitrate_mask_get_single_nss(ar, band, mask,
82218221
&single_nss)) {
82228222
rate = WMI_FIXED_RATE_NONE;
@@ -8285,9 +8285,9 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
82858285
}
82868286

82878287
mutex_lock(&ar->conf_mutex);
8288-
ieee80211_iterate_stations_atomic(ar->hw,
8289-
ath11k_mac_disable_peer_fixed_rate,
8290-
arvif);
8288+
ieee80211_iterate_stations_mtx(ar->hw,
8289+
ath11k_mac_disable_peer_fixed_rate,
8290+
arvif);
82918291

82928292
arvif->bitrate_mask = *mask;
82938293
ieee80211_iterate_stations_atomic(ar->hw,

0 commit comments

Comments
 (0)