[PATCH ath-next] wifi: ath12k: Correct tid cleanup when tid setup fails
Vasanthakumar Thiagarajan
vasanthakumar.thiagarajan at oss.qualcomm.com
Mon Jul 21 08:02:41 PDT 2025
On 7/21/2025 11:47 AM, Sarika Sharma wrote:
> Currently, if any error occurs during ath12k_dp_rx_peer_tid_setup(),
> the tid value is already incremented, even though the corresponding
> TID is not actually allocated. Proceed to
> ath12k_dp_rx_peer_tid_delete() starting from unallocated tid,
> which might leads to freeing unallocated TID and cause potential
> crash or out-of-bounds access.
>
> Hence, fix by correctly decrementing tid before cleanup to match only
> the successfully allocated TIDs.
>
> Also, remove tid-- from failure case of ath12k_dp_rx_peer_frag_setup(),
> as decrementing the tid before cleanup in loop will take care of this.
>
> Compile tested only.
>
> Signed-off-by: Sarika Sharma <quic_sarishar at quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan at oss.qualcomm.com>
More information about the ath12k
mailing list