From: Jason Gunthorpe <jgg@ziepe.ca>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Jiri Pirko <jiri@resnulli.us>,
linux-rdma@vger.kernel.org, leon@kernel.org, msanalla@nvidia.com,
maorg@nvidia.com, parav@nvidia.com, mbloch@nvidia.com,
markzhang@nvidia.com, marco.crivellari@suse.com,
roman.gushchin@linux.dev, "Yanjun.Zhu" <yanjun.zhu@linux.dev>
Subject: Re: [PATCH] RDMA/core: Fix stale RoCE GIDs during netdev events at registration
Date: Mon, 2 Feb 2026 19:51:33 -0400 [thread overview]
Message-ID: <20260202235133.GP2328995@ziepe.ca> (raw)
In-Reply-To: <d6aee73d-91cb-4eb3-ad11-6244e973932b@I-love.SAKURA.ne.jp>
On Mon, Feb 02, 2026 at 11:20:22PM +0900, Tetsuo Handa wrote:
> > - Event handlers correctly update stale GIDs even when racing with rescan
>
> I couldn't confirm that this is always true. What happens if rdma_roce_rescan_device()
> is preempted between make_default_gid() and __ib_cache_gid_add(), and NETDEV_CHANGEADDR
> event runs meanwhile? It sounds to me that stale gid is possible because gid value is
> calculated before holding the GID table mutex...
>
> rdma_roce_rescan_device() {
> ib_enum_roce_netdev() {
> enum_all_gids_of_dev_cb() {
> add_default_gids() {
> ib_cache_gid_set_default_gid() {
> make_default_gid(ndev, &gid); // GIDs populated with OLD MAC
> ip link set eth4 addr NEW_MAC
> NETDEV_CHANGEADDR queued
I thought this was impossible because enum_all_gids_of_dev_cb() holds
the rtnl_lock()?
Jason
next prev parent reply other threads:[~2026-02-02 23:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 9:38 [PATCH] RDMA/core: Fix stale RoCE GIDs during netdev events at registration Jiri Pirko
2026-01-27 11:14 ` Tetsuo Handa
2026-01-27 11:58 ` Jiri Pirko
2026-01-27 16:00 ` Jason Gunthorpe
2026-01-27 21:17 ` Yanjun.Zhu
2026-01-27 22:16 ` Tetsuo Handa
2026-01-27 22:54 ` Yanjun.Zhu
2026-01-28 4:52 ` Tetsuo Handa
2026-01-28 8:26 ` Tetsuo Handa
2026-01-28 13:40 ` Jiri Pirko
2026-01-29 6:06 ` Tetsuo Handa
2026-01-29 12:38 ` Jiri Pirko
2026-01-29 13:48 ` Tetsuo Handa
2026-01-29 14:58 ` Jiri Pirko
2026-02-02 14:20 ` Tetsuo Handa
2026-02-02 23:51 ` Jason Gunthorpe [this message]
2026-02-03 3:52 ` Tetsuo Handa
2026-02-10 8:58 ` Jiri Pirko
2026-02-10 10:22 ` Tetsuo Handa
2026-02-10 15:42 ` Jason Gunthorpe
2026-02-11 1:30 ` Tetsuo Handa
2026-02-03 9:07 ` Jiri Pirko
2026-01-28 13:43 ` Jiri Pirko
2026-02-24 8:59 ` 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=20260202235133.GP2328995@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=jiri@resnulli.us \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=marco.crivellari@suse.com \
--cc=markzhang@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=msanalla@nvidia.com \
--cc=parav@nvidia.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=roman.gushchin@linux.dev \
--cc=yanjun.zhu@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