[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJBcDTFUUfc_ZfY3visP26ziRMsdAZCmBNsZQFtJzLy4Q@mail.gmail.com>
Date: Wed, 21 Feb 2024 19:57:12 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 04/13] ipv6: use xarray iterator to implement inet6_dump_ifinfo()
On Wed, Feb 21, 2024 at 7:39 PM Ido Schimmel <idosch@...dia.com> wrote:
>
> On Wed, Feb 21, 2024 at 10:59:06AM +0000, Eric Dumazet wrote:
> > Prepare inet6_dump_ifinfo() to run with RCU protection
> > instead of RTNL and use for_each_netdev_dump() interface.
> >
> > Also properly return 0 at the end of a dump, avoiding
> > an extra recvmsg() system call and RTNL acquisition.
> >
> > Note that RTNL-less dumps need core changes, yet to come.
> >
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > Cc: Ido Schimmel <idosch@...dia.com>
>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>
>
> BTW, not sure if you saw, but there's a failure in the fib_nexthops test
> in Jakub's CI due to a lockdep splat [1]. Reproducer:
I have not seen this yet, thanks !
>
> # ip link add name dummy1 up type dummy
> # ip nexthop add id 1 dev dummy1
> # ip nexthop add id 2 dev dummy1
> # ip nexthop add id 10 group 1/2
> # ip route add 198.51.100.0/24 nhid 10
> # ip -4 r s
>
> Seems like an oversight in nexthop code and fixed by:
>
> diff --git a/include/net/nexthop.h b/include/net/nexthop.h
> index 6647ad509faa..77e99cba60ad 100644
> --- a/include/net/nexthop.h
> +++ b/include/net/nexthop.h
> @@ -317,7 +317,7 @@ static inline
> int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh,
> u8 rt_family)
> {
> - struct nh_group *nhg = rtnl_dereference(nh->nh_grp);
> + struct nh_group *nhg = rcu_dereference_rtnl(nh->nh_grp);
> int i;
>
Indeed, and this is followed few lines later by
struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); // This
was done nicely
Powered by blists - more mailing lists