diff options
author | nikolay@redhat.com <nikolay@redhat.com> | 2013-04-18 07:33:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 17:48:18 -0400 |
commit | 25e40305d4f4399bc8ecf9c9b7cf43493bb40bbd (patch) | |
tree | be81b6af45a99eb03ed813c22c8beffcea12fa57 /drivers | |
parent | cb95ec6261a205bde6451b972fbd6e1581608cae (diff) | |
download | linux-25e40305d4f4399bc8ecf9c9b7cf43493bb40bbd.tar.bz2 |
bonding: mc addresses don't get deleted on enslave failure
Add bond_mc_list_flush() after err_detach as that's the first error path
after the addresses are added. The main issue is the mc addresses' refcount
which only gets bumped up.
v2: update log message and don't move code unnecessarily
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index dea8ce20fea4..4cecb80df854 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1901,6 +1901,11 @@ err_dest_symlinks: bond_destroy_slave_symlinks(bond_dev, slave_dev); err_detach: + if (!USES_PRIMARY(bond->params.mode)) { + netif_addr_lock_bh(bond_dev); + bond_mc_list_flush(bond_dev, slave_dev); + netif_addr_unlock_bh(bond_dev); + } write_lock_bh(&bond->lock); bond_detach_slave(bond, new_slave); write_unlock_bh(&bond->lock); |