From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Bobby Eshleman <bobbyeshleman@meta.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: Re: [PATCH net-next v3] netdev: avoid skipping objects on race with device disappearance
Date: Thu, 3 Sep 2026 16:32:39 -0700 [thread overview]
Message-ID: <20260903163239.0b4a8309@kernel.org> (raw)
In-Reply-To: <CANn89iKQN1i1XswLUpvc-gHQLQAz+qqOSB1g-YCKo1UaYDnM3Q@mail.gmail.com>
On Fri, 4 Sep 2026 01:08:11 +0200 Eric Dumazet wrote:
> On Fri, Sep 4, 2026 at 12:11 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > If the currently dumped device disappears while we were mid-dump
> > we will get the next device without resetting the sub-object ID.
> > This is quite unlikely, it was reported by an AI tool not a real
> > user. Let's fix it for better dump consistency.
> >
> > We only intend to cover the case where device A disappears
> > and we skip over sub-objects of device B which was stable (B existed
> > before and after the dump). We don't intend to provide stable
> > results for any device that gets created or deleted during
> > the dump.
>
> SGTM. Note an ifindex can be reused by a new device, we might need to
> add a dev->dev_cookie
> (64bit unique number) like we have for sockets and netns to also catch
> this in the future.
That would work. IDK if it's worth the LoC, tho. The existing workaround
is to subscribe to NEW/DEL notifications, do the dump, and then "apply"
the notifications. The notifications carry correct state of the objects
which were modified, the dump has to cover only "stable" objects.
At least that's the excuse I'm telling myself :)
next prev parent reply other threads:[~2026-09-03 23:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 22:11 [PATCH net-next v3] netdev: avoid skipping objects on race with device disappearance Jakub Kicinski
2026-09-03 23:08 ` Eric Dumazet
2026-09-03 23:32 ` Jakub Kicinski [this message]
2026-09-04 23:20 ` patchwork-bot+netdevbpf
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=20260903163239.0b4a8309@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bobbyeshleman@meta.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
/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.