Re: [PATCH net-next] macvlan: fix failure during registration v3

2016-04-26 Thread Mahesh Bandewar
[...] >> > -destroy_port: >> > - port->count -= 1; >> > - if (!port->count) >> > - macvlan_port_destroy(lowerdev); >> I think you still need this when it fails netdev_upper_dev_link(). The >> only thing you should remove is the label. > > I don't think so. I think the

Re: [PATCH net-next] macvlan: fix failure during registration v3

2016-04-26 Thread David Miller
From: Francesco Ruggeri Date: Sat, 23 Apr 2016 15:03:32 -0700 > If macvlan_common_newlink fails in register_netdevice after macvlan_init > then it decrements port->count twice, first in macvlan_uninit (from > register_netdevice or rollback_registered) and then again in >

Re: [PATCH net-next] macvlan: fix failure during registration v3

2016-04-26 Thread Francesco Ruggeri
On Tue, Apr 26, 2016 at 11:54 AM, Mahesh Bandewar wrote: > > On Sat, Apr 23, 2016 at 3:03 PM, Francesco Ruggeri > wrote: > > If macvlan_common_newlink fails in register_netdevice after macvlan_init > > then it decrements port->count twice, first in

Re: [PATCH net-next] macvlan: fix failure during registration v3

2016-04-26 Thread Mahesh Bandewar
On Sat, Apr 23, 2016 at 3:03 PM, Francesco Ruggeri wrote: > If macvlan_common_newlink fails in register_netdevice after macvlan_init > then it decrements port->count twice, first in macvlan_uninit (from > register_netdevice or rollback_registered) and then again in >

Re: [PATCH net-next] macvlan: fix failure during registration v3

2016-04-25 Thread Eric W. Biederman
Francesco Ruggeri writes: > If macvlan_common_newlink fails in register_netdevice after macvlan_init > then it decrements port->count twice, first in macvlan_uninit (from > register_netdevice or rollback_registered) and then again in > macvlan_common_newlink. > A similar

[PATCH net-next] macvlan: fix failure during registration v3

2016-04-23 Thread Francesco Ruggeri
If macvlan_common_newlink fails in register_netdevice after macvlan_init then it decrements port->count twice, first in macvlan_uninit (from register_netdevice or rollback_registered) and then again in macvlan_common_newlink. A similar problem may exist in the ipvlan driver. This patch