[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iL_w6s65HAV8+YPv4NhDfmKEeWzdkpQE_-FZRfb3w-EHg@mail.gmail.com>
Date: Sun, 15 May 2022 19:28:24 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Xin Long <lucien.xin@...il.com>
Cc: network dev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net] dn_route: set rt neigh to blackhole_netdev instead of
loopback_dev in ifdown
On Sun, May 15, 2022 at 6:37 PM Xin Long <lucien.xin@...il.com> wrote:
>
> Like other places in ipv4/6 dst ifdown, change to use blackhole_netdev
> instead of pernet loopback_dev in dn dst ifdown.
>
> Since commit faab39f63c1f ("net: allow out-of-order netdev
> unregistration"), in .ifdown it's been no longer safe to use loopback_dev
> that may be freed before other netdev.
>
> Fixes: faab39f63c1f ("net: allow out-of-order netdev unregistration")
This patch does not need a Fixes tag I think, because decnet has never supported
other netns than init_net.
This probably can be routed to net-next.
Not a big deal, just trying to avoid extra backports.
Thanks.
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> ---
> net/decnet/dn_route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
> index 7e85f2a1ae25..99cc52e672b3 100644
> --- a/net/decnet/dn_route.c
> +++ b/net/decnet/dn_route.c
> @@ -159,7 +159,7 @@ static void dn_dst_ifdown(struct dst_entry *dst, struct net_device *dev, int how
> struct neighbour *n = rt->n;
>
> if (n && n->dev == dev) {
> - n->dev = dev_net(dev)->loopback_dev;
> + n->dev = blackhole_netdev;
> dev_hold(n->dev);
> dev_put(dev);
> }
> --
> 2.31.1
>
Powered by blists - more mailing lists