From: Yevgeny Kliteynik <kliteyn@nvidia.com>
To: netdev-bot+sashiko@kernel.org, acassen@corp.free.fr
Cc: saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com,
mbloch@nvidia.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, moshe@nvidia.com, vdogaru@nvidia.com,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH net] net/mlx5: HWS, fix action STE double free on rule update
Date: Sat, 28 Nov 2026 21:47:22 +0200 [thread overview]
Message-ID: <3f6fd2a9-e343-45e9-9311-d9c1f8a81c0a@nvidia.com> (raw)
In-Reply-To: <179556046979.3135.2314506196260150359@kernel.org>
On 25-Nov-26 00:47, netdev-bot+sashiko@kernel.org wrote:
...
>
> [Severity: High]
>
> The subject says this fixes the action STE double free on rule update.
> Can the old_action_ste slot still be freed twice, though?
...
> Would clearing action_ste->action_tbl inside
> mlx5hws_rule_free_action_ste() after the free make every free site safe
> to repeat? Combined with this change, that would cover this path as
> well as the one fixed here.
This is a real issue, but it is a separate one. It exists since
3fc44ca44d7c, and this patch neither causes it nor makes it worse.
It can only be hit after the send queue got an error completion,
which puts the queue in error state permanently.
I will fix it in a separate patch. Both fixes are needed, and they
don't depend on each other.
> [Severity: Medium]
>
> Does this hunk now leak the old chunk when an update to actions with no
> action STEs partially fails?
>
...
> Would either of these avoid the leak?
>
> - free old_action_ste in the DELETED completion and in the
> skip_delete branch
> - restore action_ste from old_action_ste on partial failure
The leak is real, but it is limited to an update that fails
partially: an FDB rule in both RX and TX RTCs, where the STE write
fails in one RTC and succeeds in the other. It is also the same leak
that already exists when the new actions do need action STEs: in that
case too, old_action_ste is the only reference to the old chunk, and
the rule deletion frees only action_ste. This patch makes both cases
behave the same way.
Freeing old_action_ste on rule deletion is not safe in this case.
Restoring action_ste from old_action_ste is not right either.
Proper handling of partially failed updates is a separate change,
not something for this fix.
My Reviewed-by on this patch stands.
prev parent reply other threads:[~2026-11-28 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 22:13 [PATCH net] net/mlx5: HWS, fix action STE double free on rule update Alexandre Cassen
2026-11-24 12:09 ` Yevgeny Kliteynik
2026-11-24 22:47 ` netdev-bot+sashiko
2026-11-28 19:47 ` Yevgeny Kliteynik [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=3f6fd2a9-e343-45e9-9311-d9c1f8a81c0a@nvidia.com \
--to=kliteyn@nvidia.com \
--cc=acassen@corp.free.fr \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=vdogaru@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