3.13.11-ckt15 -stable review patch. If anyone has any objections, please let me know.
------------------ From: Cong Wang <[email protected]> commit da37705cef30841616ed644ff33455bbc7374db0 upstream. rtnl_newlink() doesn't unregister it for us on failure. Cc: Patrick McHardy <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]> Cc: Zefan Li <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> --- drivers/net/macvlan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 0831e2f..b0ae4b2 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -899,14 +899,15 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev, dev->priv_flags |= IFF_MACVLAN; err = netdev_upper_dev_link(lowerdev, dev); if (err) - goto destroy_port; - + goto unregister_netdev; list_add_tail_rcu(&vlan->list, &port->vlans); netif_stacked_transfer_operstate(lowerdev, dev); return 0; +unregister_netdev: + unregister_netdevice(dev); destroy_port: port->count -= 1; if (!port->count) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

