From: Tariq Toukan <tariqt@nvidia.com>
To: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: dtatulea@nvidia.com, Carolina Jubran <cjubran@nvidia.com>,
Cosmin Ratiu <cratiu@nvidia.com>,
Erez Shitrit <erezsh@mellanox.com>,
Alex Vesker <valex@mellanox.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net/mlx5e: IPOIB, Fix QPN lookup race
Date: Thu, 5 Nov 2026 20:48:21 +0200 [thread overview]
Message-ID: <65b12759-48a6-4550-a847-de40cff176c0@nvidia.com> (raw)
In-Reply-To: <20261031225749.14214-1-prathameshdeshpande7@gmail.com>
On 01/11/2026 0:57, Prathamesh Deshpande wrote:
> The parent RX completion path can load a QPN hash entry before
> mlx5i_pkey_del_qpn() unlinks and frees it, then dereference freed memory.
>
> Use RCU hlist operations and defer freeing with kfree_rcu(). The existing
> RCU read-side section in mlx5e_napi_poll() covers the lookup. Keep ht_lock
> for writers and acquire it before looking up the entry to delete.
>
> Fixes: 7e7f4780c340 ("net/mlx5e: IPoIB, Use hash-table to map between QPN to child netdev")
> Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
> ---
>
> Changes in v2:
> - Replace the RX spinlock with RCU traversal and deferred freeing.
> - Narrow the description to the parent CQE lookup race.
>
> v1: https://lore.kernel.org/all/20261030002241.8508-1-prathameshdeshpande7@gmail.com/
> Review: https://lore.kernel.org/all/ade46454-e575-43e4-85aa-eeb5ad79408a@nvidia.com/
>
nit: Convention is IPoIB, not IPOIB. Maybe can be modified while applying.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks.
prev parent reply other threads:[~2026-11-05 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 22:57 Prathamesh Deshpande
2026-10-31 23:03 ` netdev-bot+sinfo
2026-11-05 18:48 ` Tariq Toukan [this message]
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=65b12759-48a6-4550-a847-de40cff176c0@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@kernel.org \
--cc=erezsh@mellanox.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prathameshdeshpande7@gmail.com \
--cc=saeedm@nvidia.com \
--cc=valex@mellanox.com \
/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
all inboxes | Powered by JetHome®