[PATCH ath-next] wifi: ath12k: Assert base_lock is held before allocating REO update element

Baochen Qiang baochen.qiang at oss.qualcomm.com
Tue Oct 21 19:01:54 PDT 2025



On 10/21/2025 7:22 PM, Sarika Sharma wrote:
> Add a lockdep assertion to verify that ab->base_lock is held prior to
> allocating a REO update element in ath12k_dp_prepare_reo_update_elem().
> This helps detect potential concurrency issues during development and
> improves code robustness.
> Compiled tested only.
> 
> Signed-off-by: Sarika Sharma <sarika.sharma at oss.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath12k/dp_rx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index 6c9f0839c83a..d28d8ffec0f8 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -1089,6 +1089,8 @@ static int ath12k_dp_prepare_reo_update_elem(struct ath12k_dp *dp,
>  {
>  	struct dp_reo_update_rx_queue_elem *elem;
>  
> +	lockdep_assert_held(&dp->ab->base_lock);
> +
>  	elem = kzalloc(sizeof(*elem), GFP_ATOMIC);
>  	if (!elem)
>  		return -ENOMEM;
> 
> base-commit: 2b306fc6b1d00dfe85b3b80eb257256e2b5ba610

Reviewed-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>



More information about the ath12k mailing list