From: sashiko-bot@kernel.org
To: lirongqing <lirongqing@baidu.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/mlx5: Guard steering anchor resource destruction on create error
Date: Thu, 17 Sep 2026 09:13:40 +0000 [thread overview]
Message-ID: <20260917091340.AD3A01F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917085419.1792-1-lirongqing@baidu.com>
> From: Li RongQing <lirongqing@baidu.com>
>
> The steering anchor resources are shared between anchors with the same
> priority and are protected by rule_goto_table_ref.
>
> When steering anchor creation succeeds but uverbs_copy_to() fails, the
> error path drops the reference acquired for the new anchor. However, it
> unconditionally calls mlx5_steering_anchor_destroy_res(), even when
> other anchors are still using the shared resources.
>
> This can destroy the shared flow table, flow groups, and rules while
> existing anchors still hold references to them, resulting in a
> use-after-free when those anchors are subsequently cleaned up.
>
> Only destroy the shared resources when dropping the reference makes
> rule_goto_table_ref zero, consistent with the existing cleanup path.
>
> Fixes: e1f4a52ac171 ("RDMA/mlx5: Create an indirect flow table for steering anchor")
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260917085419.1792-1-lirongqing@baidu.com?part=1
next prev parent reply other threads:[~2026-09-17 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 8:54 [PATCH] RDMA/mlx5: Guard steering anchor resource destruction on create error lirongqing
2026-09-17 9:13 ` sashiko-bot [this message]
2026-09-23 10:45 ` Leon Romanovsky
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=20260917091340.AD3A01F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.