Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-22 Thread Kirill Tkhai
On 21.06.2018 18:28, David Ahern wrote: > On 6/21/18 4:03 AM, Kirill Tkhai wrote: >>> This patch does not remove the BUG, so does not really solve the >>> problem. ie., it is fairly trivial to write a script (32k dev%d named >>> devices in init_net) that triggers it again, so your commit subject

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-21 Thread David Ahern
On 6/21/18 4:03 AM, Kirill Tkhai wrote: >> This patch does not remove the BUG, so does not really solve the >> problem. ie., it is fairly trivial to write a script (32k dev%d named >> devices in init_net) that triggers it again, so your commit subject and >> commit log are not correct with the

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-21 Thread Kirill Tkhai
On 20.06.2018 20:15, David Ahern wrote: > On 6/20/18 2:57 AM, Kirill Tkhai wrote: >> From: Kirill Tkhai >> >> The following script makes kernel to crash since it can't obtain >> a name for a device, when the name is occupied by another device: >> >> #!/bin/bash >> ifconfig eth0 down >> ifconfig

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-20 Thread David Ahern
On 6/20/18 2:57 AM, Kirill Tkhai wrote: > From: Kirill Tkhai > > The following script makes kernel to crash since it can't obtain > a name for a device, when the name is occupied by another device: > > #!/bin/bash > ifconfig eth0 down > ifconfig eth1 down > index=`cat

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-18 Thread Kirill Tkhai
On 18.06.2018 14:21, Kirill Tkhai wrote: > On 17.06.2018 21:58, David Ahern wrote: >> On 6/15/18 3:44 AM, Kirill Tkhai wrote: >>> Hm, but is this a likely case, when real device is moved to net ns, so it >>> requires moving to init_net back? It seems the most devices moved to >>> !init_net >>>

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-18 Thread Kirill Tkhai
On 17.06.2018 21:58, David Ahern wrote: > On 6/15/18 3:44 AM, Kirill Tkhai wrote: >> Hm, but is this a likely case, when real device is moved to net ns, so it >> requires moving to init_net back? It seems the most devices moved to >> !init_net >> are virtual and they just destroyed in

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-17 Thread David Ahern
On 6/15/18 3:44 AM, Kirill Tkhai wrote: > Hm, but is this a likely case, when real device is moved to net ns, so it > requires moving to init_net back? It seems the most devices moved to !init_net > are virtual and they just destroyed in default_device_exit_batch(). Or we have > more devices to

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-15 Thread Kirill Tkhai
On 14.06.2018 20:11, David Ahern wrote: > On 6/14/18 6:38 AM, Kirill Tkhai wrote: >> The following script makes kernel to crash since it can't obtain >> a name for a device, when the name is occupied by another device: >> >> #!/bin/bash >> ifconfig eth0 down >> ifconfig eth1 down >> index=`cat

Re: [PATCH] net: Fix device name resolving crash in default_device_exit()

2018-06-14 Thread David Ahern
On 6/14/18 6:38 AM, Kirill Tkhai wrote: > The following script makes kernel to crash since it can't obtain > a name for a device, when the name is occupied by another device: > > #!/bin/bash > ifconfig eth0 down > ifconfig eth1 down > index=`cat /sys/class/net/eth1/ifindex` > ip link set eth1