]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: Fix failure path in dev registration during link creation
authorMahesh Bandewar <maheshb@google.com>
Wed, 27 Apr 2016 21:59:27 +0000 (14:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 21:23:08 +0000 (17:23 -0400)
commitda97fabf15c329fc52285620dd7b2b5dfb6c9510
treeb4caedab38388527503bb7d2ddeb857774411b81
parent3c418308e7f7f9e6b2c483a570f0bf48dbbb9104
ipvlan: Fix failure path in dev registration during link creation

When newlink creation fails at device-registration, the port->count
is decremented twice. Francesco Ruggeri (fruggeri@arista.com) found
this issue in Macvlan and the same exists in IPvlan driver too.

While fixing this issue I noticed another issue of missing unregister
in case of failure, so adding it to the fix which is similar to the
macvlan fix by Francesco in commit 0600f9e38c13 ("macvlan: fix failure
during registration v3")

Reported-by: Francesco Ruggeri <fruggeri@arista.com>
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
CC: Eric Dumazet <edumazet@google.com>
CC: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c