From: sashiko-bot@kernel.org
To: "Danielle Costantino" <dcostantino@meta.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net 1/2] net/mlx5: Bound the command interface drain so teardown cannot hang
Date: Wed, 16 Sep 2026 23:00:40 +0000 [thread overview]
Message-ID: <20260916230041.2D2201F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915225941.554568-2-dcostantino@meta.com>
> mlx5_cmd_allowed_opcode() and mlx5_cmd_change_mod() drain the command
> interface before updating a field that every in flight command reads, by
> taking every unit of cmd->vars.sem:
>
> for (i = 0; i < cmd->vars.max_reg_cmds; i++)
> down(&cmd->vars.sem);
> down(&cmd->vars.pages_sem);
>
> Since commit 8e715cd613a1 ("net/mlx5: Set command entry semaphore up once
> got index free") a unit is handed back from cmd_ent_put(), under the
> refcount that reaches zero:
>
> if (ent->idx >= 0) {
> cmd_free_index(cmd, ent->idx);
> up(ent->page_queue ? &cmd->vars.pages_sem : &cmd->vars.sem);
> [ ... ]
> queue semaphore").
>
> Fixes: 8e715cd613a1 ("net/mlx5: Set command entry semaphore up once got index free")
> Cc: stable@vger.kernel.org
> Signed-off-by: Danielle Costantino <dcostantino@meta.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915225941.554568-1-dcostantino@meta.com?part=1
next prev parent reply other threads:[~2026-09-16 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 22:59 [PATCH net 0/2] net/mlx5: command mailbox use-after-free, and the teardown hang hiding it Danielle Costantino
2026-09-15 22:59 ` [PATCH net 1/2] net/mlx5: Bound the command interface drain so teardown cannot hang Danielle Costantino
2026-09-16 23:00 ` sashiko-bot [this message]
2026-09-19 23:41 ` netdev-bot+sashiko
2026-09-22 11:21 ` Moshe Shemesh
2026-09-15 22:59 ` [PATCH net 2/2] net/mlx5: Don't return firmware-owned command mailboxes to the DMA pool Danielle Costantino
2026-09-16 23:00 ` sashiko-bot
2026-09-19 23:41 ` netdev-bot+sashiko
2026-09-16 5:31 ` [PATCH net 0/2] net/mlx5: command mailbox use-after-free, and the teardown hang hiding it 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=20260916230041.2D2201F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dcostantino@meta.com \
--cc=linux-rdma@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox