History

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

nikolay@redhat.com committed 13 years ago

Commit 25e40301 parent cb95ec61 file · +5 −0Browse files

Unified · Split

drivers/net/bonding/bond_main.c+5−0
@@ -1901,6 +1901,11 @@ err_dest_symlinks: · 1900 unmodified lines
19011901 bond_destroy_slave_symlinks(bond_dev, slave_dev);
19021902
19031903 err_detach:
1904+ if (!USES_PRIMARY(bond->params.mode)) {
1905+ netif_addr_lock_bh(bond_dev);
1906+ bond_mc_list_flush(bond_dev, slave_dev);
1907+ netif_addr_unlock_bh(bond_dev);
1908+ }
19041909 write_lock_bh(&bond->lock);
19051910 bond_detach_slave(bond, new_slave);
19061911 write_unlock_bh(&bond->lock);