All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ginger Li" <ginger.jzllee@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net] net/mlx5: HV VHCA: Fix the agent registration race
Date: Tue, 22 Sep 2026 07:48:22 +0000	[thread overview]
Message-ID: <20260922074822.D65471F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922074246.20411-1-ginger.jzllee@gmail.com>

> mlx5_hv_vhca_agent_create() drops agents_lock between checking whether an
> agent is already registered for the type and publishing the new agent, so two
> concurrent create calls for the same type can both pass the check.  The second
> one then silently replaces the first one in hv_vhca->agents[], and the agent
> allocated by the first call is leaked.
> 
> Hold agents_lock for the whole registration.  While at it, read
> hv_vhca->agents[MLX5_HV_VHCA_AGENT_CONTROL] under the lock in
> mlx5_hv_vhca_cleanup() as well, since that slot is written under the lock.
> 
> Fixes: 87175120defd ("net/mlx5: Add HV VHCA infrastructure")
> Signed-off-by: Ginger Li <ginger.jzllee@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260922074246.20411-1-ginger.jzllee@gmail.com?part=1


  reply	other threads:[~2026-09-22  7:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  7:42 [PATCH net] net/mlx5: HV VHCA: Fix the agent registration race Ginger Li
2026-09-22  7:48 ` sashiko-bot [this message]
2026-09-25  7:42 ` netdev-bot+sashiko
2026-09-27  8:53   ` Simon Horman

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=20260922074822.D65471F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ginger.jzllee@gmail.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 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.