From: Daniel Machon <daniel.machon@microchip.com>
To: Zhao Li <enderaoelyther@gmail.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
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>,
Moshe Shemesh <moshe@nvidia.com>, Shay Drory <shayd@nvidia.com>,
Akiva Goldberger <agoldberger@nvidia.com>,
<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net/mlx5e: TC, fix a NULL pointer write in the peer flow error path
Date: Mon, 23 Nov 2026 10:00:49 +0100 [thread overview]
Message-ID: <20261123090049.hkhclpdiljjfptff@DEN-DL-M70577> (raw)
In-Reply-To: <20261118025708.86215-1-enderaoelyther@gmail.com>
> The peer flow add path hands the duplicated flow over to the origin
> flow before it looks up the peer entry for the peer vhca_id. When
> that entry is missing, the function returns -ENODEV, and the caller
> then deletes the duplicated flow with list_del() on its peer node, a
> list head that was never initialised and never linked. list_del() on
> such a node writes through the NULL page.
>
> Look the peer entry up before the duplicated flow is created and
> handed over, so that a missing entry is reported without leaving a
> duplicated flow behind. The entry cannot change in between: the peer
> loop in mlx5e_add_fdb_flow() holds the devcom component's read lock,
> and peer_flows entries are only stored and erased by the pair and
> unpair events, under its write lock.
>
> Found by code review and not reproduced; compile-tested only.
>
> AI assistance was used.
>
> Fixes: 9d608a40c2d4 ("net/mlx5e: TC, track peer flows in a vhca_id xarray")
> Signed-off-by: Zhao Li <enderaoelyther@gmail.com>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
next prev parent reply other threads:[~2026-11-23 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 2:57 [PATCH net] net/mlx5e: TC, fix a NULL pointer write in the peer flow error path Zhao Li
2026-11-23 9:00 ` Daniel Machon [this message]
2026-11-23 10:10 ` Shay Drori
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=20261123090049.hkhclpdiljjfptff@DEN-DL-M70577 \
--to=daniel.machon@microchip.com \
--cc=agoldberger@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=enderaoelyther@gmail.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=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
--cc=tariqt@nvidia.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