Netdev List
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@nvidia.com>
To: prathameshdeshpande7@gmail.com, tariqt@nvidia.com
Cc: saeedm@nvidia.com, leon@kernel.org, mbloch@nvidia.com,
	sdf@fomichev.me, netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH net] net/mlx5e: Fix AF_XDP TX timestamp teardown NULL dereference
Date: Mon, 28 Sep 2026 15:15:31 +0300	[thread overview]
Message-ID: <2d2f2ef3-1d96-4ee6-b765-b61f214c57b1@nvidia.com> (raw)
In-Reply-To: <20260926165402.5902-1-prathameshdeshpande7@gmail.com>



On 26/09/2026 19:53, prathameshdeshpande7@gmail.com wrote:
> From: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
> 
> During XSK TX queue teardown, outstanding descriptors are completed
> without a CQE. If one requested a TX timestamp, the completion path
> passes that NULL CQE to mlx5e_xsk_fill_timestamp(), which dereferences
> it.
> 
> Return zero when no CQE is available, indicating that teardown did not
> produce a TX timestamp.
> 
> Fixes: ec706a860eba ("net/mlx5e: Implement AF_XDP TX timestamp and checksum offload")
> 
> Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> index 77ea51bfbaae..2cca20e1b9b7 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> @@ -293,6 +293,9 @@ static u64 mlx5e_xsk_fill_timestamp(void *_priv)
>   	struct mlx5e_xsk_tx_complete *priv = _priv;
>   	u64 ts;
>   
> +	if (!priv->cqe)
> +		return 0;
> +
>   	ts = get_cqe_ts(priv->cqe);
>   
>   	if (mlx5_is_real_time_rq(priv->cq->mdev) || mlx5_is_real_time_sq(priv->cq->mdev))


Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks.

  reply	other threads:[~2026-09-28 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 16:53 [PATCH net] net/mlx5e: Fix AF_XDP TX timestamp teardown NULL dereference prathameshdeshpande7
2026-09-28 12:15 ` Tariq Toukan [this message]
2026-10-01  1:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d2f2ef3-1d96-4ee6-b765-b61f214c57b1@nvidia.com \
    --to=tariqt@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=leon@kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=prathameshdeshpande7@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=sdf@fomichev.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox