> -----Original Message-----
> From: Tantilov, Emil S <[email protected]>
> Sent: Thursday, March 19, 2026 10:14 PM
> To: [email protected]
> Cc: [email protected]; Nguyen, Anthony L
> <[email protected]>; Loktionov, Aleksandr
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Tantilov, Emil S
> <[email protected]>; [email protected]
> Subject: [PATCH iwl-net v2 2/3] idpf: improve locking around
> idpf_vc_xn_push_free()
> 
> Protect the set_bit() operation for the free_xn bitmask in
> idpf_vc_xn_push_free(), to make the locking consistent with rest of
> the code and avoid potential races in that logic.
> 
> Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
> Cc: [email protected]
> Reported-by: Ray Zhang <[email protected]>
> Signed-off-by: Emil Tantilov <[email protected]>
> ---
>  drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> index 582e0c8e9dc0..fbd5a15b015c 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
> @@ -402,7 +402,9 @@ static void idpf_vc_xn_push_free(struct
> idpf_vc_xn_manager *vcxn_mngr,
>                                struct idpf_vc_xn *xn)
>  {
>       idpf_vc_xn_release_bufs(xn);
> +     spin_lock_bh(&vcxn_mngr->xn_bm_lock);
>       set_bit(xn->idx, vcxn_mngr->free_xn_bm);
> +     spin_unlock_bh(&vcxn_mngr->xn_bm_lock);
>  }
> 
>  /**
> --
> 2.37.3

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to