Commit a506e7b4 authored by nikolay@redhat.com's avatar nikolay@redhat.com Committed by David S. Miller

bonding: vlans don't get deleted on enslave failure

The main problem is with vid refcount which only gets bumped up.
Delete the vlans after err_detach as that's the first error path
after the vlans are added.
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 25e40305
...@@ -1906,6 +1906,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) ...@@ -1906,6 +1906,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
bond_mc_list_flush(bond_dev, slave_dev); bond_mc_list_flush(bond_dev, slave_dev);
netif_addr_unlock_bh(bond_dev); netif_addr_unlock_bh(bond_dev);
} }
bond_del_vlans_from_slave(bond, slave_dev);
write_lock_bh(&bond->lock); write_lock_bh(&bond->lock);
bond_detach_slave(bond, new_slave); bond_detach_slave(bond, new_slave);
write_unlock_bh(&bond->lock); write_unlock_bh(&bond->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment