Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-03 Thread David Ahern
On 10/3/19 11:19 AM, Eric Dumazet wrote: > > On 10/3/19 9:32 AM, Eric Dumazet wrote: >> Still no luck for me :/ >> > One of the failing test was : > > unshare -n > ./traceroute_test.sh -I icmp > thanks for the test. I need to chase down a few more code paths, but I am thinking the proper next s

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-03 Thread Eric Dumazet
On 10/3/19 9:32 AM, Eric Dumazet wrote: > > > Still no luck for me :/ > One of the failing test was : unshare -n ./traceroute_test.sh -I icmp $ cat ./traceroute_test.sh #!/bin/bash # # Test traceroute. # # This is a test to run traceroute with the given parameters. It sets up three # con

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-03 Thread Eric Dumazet
On 10/3/19 8:50 AM, David Ahern wrote: > On 10/2/19 3:23 PM, Eric Dumazet wrote: >> >> It seems we need to allow the code to do some changes if IF_READY is not set. >> > > That statement was correct. Prior to the patch in question ifp->state is > bumped to INET6_IFADDR_STATE_DAD in addrconf_da

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-03 Thread David Ahern
On 10/2/19 3:23 PM, Eric Dumazet wrote: > > > On 10/2/19 2:08 PM, Eric Dumazet wrote: >> >> >> On 10/1/19 11:18 AM, Eric Dumazet wrote: >>> >>> >>> On 9/30/19 8:28 PM, David Ahern wrote: From: David Ahern Rajendra reported a kernel panic when a link was taken down: [ 687

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread David Ahern
On 10/2/19 6:36 PM, Eric Dumazet wrote: > > > On 10/2/19 5:10 PM, David Ahern wrote: >> On 10/2/19 4:36 PM, Eric Dumazet wrote: >>> This might be related to a use of a bonding device, with a mlx4 slave. >>> >> >> does it only happen with bonds? > > All my hosts have bonds, some are just fine wit

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/2/19 5:10 PM, David Ahern wrote: > On 10/2/19 4:36 PM, Eric Dumazet wrote: >> This might be related to a use of a bonding device, with a mlx4 slave. >> > > does it only happen with bonds? All my hosts have bonds, some are just fine with your patch, but others are not. > > bond shows IF

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread David Ahern
On 10/2/19 4:36 PM, Eric Dumazet wrote: > This might be related to a use of a bonding device, with a mlx4 slave. > does it only happen with bonds? bond shows IF_READY even though the underlying device is carrier down which seems wrong; if a lower device is not carrier up then DAD does not really

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread David Ahern
On 10/2/19 5:11 PM, Eric Dumazet wrote: > > > On 10/2/19 3:36 PM, Eric Dumazet wrote: >> >> >> On 10/2/19 3:33 PM, David Ahern wrote: > >>> >>> I flipped to IF_READY based on addrconf_ifdown and idev checks seeming >>> more appropriate. >>> >> > > Note that IF_READY is set in ipv6_add_dev() if

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/2/19 3:36 PM, Eric Dumazet wrote: > > > On 10/2/19 3:33 PM, David Ahern wrote: >> >> I flipped to IF_READY based on addrconf_ifdown and idev checks seeming >> more appropriate. >> > Note that IF_READY is set in ipv6_add_dev() if all these conditions are true : if (netif_running(dev)

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/2/19 3:33 PM, David Ahern wrote: > On 10/2/19 4:21 PM, Eric Dumazet wrote: >> o syzbot this time, but complete lack of connectivity on some of my test >> hosts. >> >> Incoming IPv6 packets go to ip6_forward() (!!!) and are dropped there. > > what does 'ip -6 addr sh' show when it is in t

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread David Ahern
On 10/2/19 4:21 PM, Eric Dumazet wrote: > o syzbot this time, but complete lack of connectivity on some of my test > hosts. > > Incoming IPv6 packets go to ip6_forward() (!!!) and are dropped there. what does 'ip -6 addr sh' show when it is in this state? Any idea of the order of events? > > T

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/2/19 3:13 PM, David Ahern wrote: > On 10/2/19 3:23 PM, Eric Dumazet wrote: >> >> >> On 10/2/19 2:08 PM, Eric Dumazet wrote: >>> >>> >>> On 10/1/19 11:18 AM, Eric Dumazet wrote: On 9/30/19 8:28 PM, David Ahern wrote: > From: David Ahern > > Rajendra reported a ke

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread David Ahern
On 10/2/19 3:23 PM, Eric Dumazet wrote: > > > On 10/2/19 2:08 PM, Eric Dumazet wrote: >> >> >> On 10/1/19 11:18 AM, Eric Dumazet wrote: >>> >>> >>> On 9/30/19 8:28 PM, David Ahern wrote: From: David Ahern Rajendra reported a kernel panic when a link was taken down: [ 687

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/2/19 2:08 PM, Eric Dumazet wrote: > > > On 10/1/19 11:18 AM, Eric Dumazet wrote: >> >> >> On 9/30/19 8:28 PM, David Ahern wrote: >>> From: David Ahern >>> >>> Rajendra reported a kernel panic when a link was taken down: >>> >>> [ 6870.263084] BUG: unable to handle kernel NULL pointer de

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-02 Thread Eric Dumazet
On 10/1/19 11:18 AM, Eric Dumazet wrote: > > > On 9/30/19 8:28 PM, David Ahern wrote: >> From: David Ahern >> >> Rajendra reported a kernel panic when a link was taken down: >> >> [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at >> 00a8 >> [ 6870.271856] IP

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-01 Thread David Miller
From: David Ahern Date: Mon, 30 Sep 2019 20:28:34 -0700 > From: David Ahern > > Rajendra reported a kernel panic when a link was taken down: ... > addrconf_dad_work is kicked to be scheduled when a device is brought > up. There is a race between addrcond_dad_work getting scheduled and > taking

Re: [PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-10-01 Thread Eric Dumazet
On 9/30/19 8:28 PM, David Ahern wrote: > From: David Ahern > > Rajendra reported a kernel panic when a link was taken down: > > [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at > 00a8 > [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290 > > > Reviewed-

[PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread David Ahern
From: David Ahern Rajendra reported a kernel panic when a link was taken down: [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290 [ 6870.570501] Call Trace: [ 6870.573238] [] ? ipv6_ifa_notify+0x26/0x40