netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsahern@kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
	Jaroslav Pulchart <jaroslav.pulchart@gooddata.com>
Subject: Re: [PATCH net] inet: bring NLM_DONE out to a separate recv() in inet_dump_ifaddr()
Date: Mon, 3 Jun 2024 07:59:41 -0700	[thread overview]
Message-ID: <20240603075941.297d1e56@kernel.org> (raw)
In-Reply-To: <CANn89iKF3z_c7_2bqAVcqKZfrsFaTtdQcUNvMQo4mZCFk0Nx8g@mail.gmail.com>

On Mon, 3 Jun 2024 16:22:19 +0200 Eric Dumazet wrote:
> > Hi Eric, how do you feel about this approach? It would also let us
> > extract the "RTNL unlocked dump" handling from af_netlink.c, which
> > would be nice.  
> 
> Sure, I have not thought of af_netlink
> 
> > BTW it will probably need to be paired with fixing the
> > for_each_netdev_dump() foot gun, maybe (untested):
> 
> I confess I am a bit lost : this part relates to your original submission,
> when you set "ctx->ifindex = ULONG_MAX;"  in inet_dump_ifaddr() ?

Yes, xa_for_each_start() leaves ifindex at the last valid entry, so
without this snippet it's not safe to call dump again after we reached
the end.

  reply	other threads:[~2024-06-03 14:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01 21:25 [PATCH net] inet: bring NLM_DONE out to a separate recv() in inet_dump_ifaddr() Jakub Kicinski
2024-06-01 23:10 ` Stephen Hemminger
2024-06-01 23:48   ` Jakub Kicinski
2024-06-02  2:23     ` David Ahern
2024-06-02 10:00       ` Eric Dumazet
2024-06-02 22:21         ` Jakub Kicinski
2024-06-03 13:54           ` Jakub Kicinski
2024-06-03 14:22             ` Eric Dumazet
2024-06-03 14:59               ` Jakub Kicinski [this message]
2024-06-03 15:26                 ` Eric Dumazet
2024-06-02 21:59       ` Jakub Kicinski
2024-06-03  2:42         ` David Ahern
2024-06-03 14:05       ` Jamal Hadi Salim
2024-06-03 15:33         ` David Ahern
2024-06-03 15:34         ` Eric Dumazet

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=20240603075941.297d1e56@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jaroslav.pulchart@gooddata.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).