Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev() and then crash after another

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev() and then crash after another

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread Andrey Konovalov
On Wed, Jun 21, 2017 at 11:34 PM, Cong Wang wrote: > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev() and then crash after another > c

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-21 Thread David Ahern
On 6/21/17 5:34 PM, Cong Wang wrote: > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 686c923..1d2dbac 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -3369,6 +3369,7 @@ static int addrconf_notify(struct notifier_block *this, > unsigned long event, > struc

[Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-21 Thread Cong Wang
The per netns loopback_dev->ip6_ptr is unregistered and set to NULL when its mtu is set to smaller than IPV6_MIN_MTU, this leads to that we could set rt->rt6i_idev NULL after a rt6_uncached_list_flush_dev() and then crash after another call. In this case we should just bring its inet6_dev down, ra