[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKax5w4Cx+q-fZa5GEjXwgZzn0Z_=VUWMO_F4Po3hFyxg@mail.gmail.com>
Date: Mon, 3 Jun 2024 17:26:46 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Ahern <dsahern@...nel.org>, Stephen Hemminger <stephen@...workplumber.org>, davem@...emloft.net,
netdev@...r.kernel.org, pabeni@...hat.com,
Jaroslav Pulchart <jaroslav.pulchart@...ddata.com>
Subject: Re: [PATCH net] inet: bring NLM_DONE out to a separate recv() in inet_dump_ifaddr()
On Mon, Jun 3, 2024 at 4:59 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> 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.
A generic change would be to make sure we remember we hit the end,
I guess this can be done later.
Powered by blists - more mailing lists