* [PATCH 6.14.y v2 1/2] Revert "wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process"
@ 2025-04-22 12:02 Alexander Tsoy
2025-04-22 12:02 ` [PATCH 6.14.y v2 2/2] wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process Alexander Tsoy
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Tsoy @ 2025-04-22 12:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable; +Cc: patches, P Praneesh, Jeff Johnson, Sasha Levin
This reverts commit 0c1015493f0e3979bcbd3a12ebc0977578c87f21 as it was
backported incorrectly.
A subsequent commit will re-backport the original patch.
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 0b089389087d..8005d30a4dbe 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2473,7 +2473,7 @@ int ath12k_dp_mon_rx_process_stats(struct ath12k *ar, int mac_id,
dest_idx = 0;
move_next:
ath12k_dp_mon_buf_replenish(ab, buf_ring, 1);
- ath12k_hal_srng_dst_get_next_entry(ab, srng);
+ ath12k_hal_srng_src_get_next_entry(ab, srng);
num_buffs_reaped++;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.14.y v2 2/2] wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process
2025-04-22 12:02 [PATCH 6.14.y v2 1/2] Revert "wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process" Alexander Tsoy
@ 2025-04-22 12:02 ` Alexander Tsoy
2025-04-22 13:06 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Tsoy @ 2025-04-22 12:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable; +Cc: patches, P Praneesh, Jeff Johnson, Sasha Levin
From: P Praneesh <quic_ppranees@quicinc.com>
[ Upstream commit 63fdc4509bcf483e79548de6bc08bf3c8e504bb3 ]
Currently, ath12k_dp_mon_srng_process uses ath12k_hal_srng_src_get_next_entry
to fetch the next entry from the destination ring. This is incorrect because
ath12k_hal_srng_src_get_next_entry is intended for source rings, not destination
rings. This leads to invalid entry fetches, causing potential data corruption or
crashes due to accessing incorrect memory locations. This happens because the
source ring and destination ring have different handling mechanisms and using
the wrong function results in incorrect pointer arithmetic and ring management.
To fix this issue, replace the call to ath12k_hal_srng_src_get_next_entry with
ath12k_hal_srng_dst_get_next_entry in ath12k_dp_mon_srng_process. This ensures
that the correct function is used for fetching entries from the destination
ring, preventing invalid memory accesses.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Link: https://patch.msgid.link/20241223060132.3506372-7-quic_ppranees@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 8005d30a4dbe..b952e79179d0 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2054,7 +2054,7 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int mac_id, int *budget,
dest_idx = 0;
move_next:
ath12k_dp_mon_buf_replenish(ab, buf_ring, 1);
- ath12k_hal_srng_src_get_next_entry(ab, srng);
+ ath12k_hal_srng_dst_get_next_entry(ab, srng);
num_buffs_reaped++;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.14.y v2 2/2] wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process
2025-04-22 12:02 ` [PATCH 6.14.y v2 2/2] wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process Alexander Tsoy
@ 2025-04-22 13:06 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-04-22 13:06 UTC (permalink / raw)
To: Alexander Tsoy; +Cc: stable, patches, P Praneesh, Jeff Johnson, Sasha Levin
On Tue, Apr 22, 2025 at 03:02:37PM +0300, Alexander Tsoy wrote:
> From: P Praneesh <quic_ppranees@quicinc.com>
>
> [ Upstream commit 63fdc4509bcf483e79548de6bc08bf3c8e504bb3 ]
>
> Currently, ath12k_dp_mon_srng_process uses ath12k_hal_srng_src_get_next_entry
> to fetch the next entry from the destination ring. This is incorrect because
> ath12k_hal_srng_src_get_next_entry is intended for source rings, not destination
> rings. This leads to invalid entry fetches, causing potential data corruption or
> crashes due to accessing incorrect memory locations. This happens because the
> source ring and destination ring have different handling mechanisms and using
> the wrong function results in incorrect pointer arithmetic and ring management.
>
> To fix this issue, replace the call to ath12k_hal_srng_src_get_next_entry with
> ath12k_hal_srng_dst_get_next_entry in ath12k_dp_mon_srng_process. This ensures
> that the correct function is used for fetching entries from the destination
> ring, preventing invalid memory accesses.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
> Link: https://patch.msgid.link/20241223060132.3506372-7-quic_ppranees@quicinc.com
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
You didn't sign off on this :(
And I don't think Sasha did either.
Be careful with these types of attributes please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-22 13:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 12:02 [PATCH 6.14.y v2 1/2] Revert "wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process" Alexander Tsoy
2025-04-22 12:02 ` [PATCH 6.14.y v2 2/2] wifi: ath12k: Fix invalid entry fetch in ath12k_dp_mon_srng_process Alexander Tsoy
2025-04-22 13:06 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox