net: Handle unregister properly when netdev namespace change fails.
authorDavid S. Miller <davem@davemloft.net>
Wed, 11 Mar 2015 01:58:32 +0000 (21:58 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Mar 2015 01:59:46 +0000 (21:59 -0400)
commit4363890079674db7b00cf1bb0e6fa430e846e86b
tree0b7905168810419c0fb2aa8fbead213f546257d5
parent7768eed8bf1d2e5eefa38c573f15f737a9824052
net: Handle unregister properly when netdev namespace change fails.

If rtnl_newlink() fails on it's call to dev_change_net_namespace(), we
have to make use of the ->dellink() method, if present, just like we
do when rtnl_configure_link() fails.

Fixes: 317f4810e45e ("rtnl: allow to create device with IFLA_LINK_NETNSID set")
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c