Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25e40305 authored by nikolay@redhat.com's avatar nikolay@redhat.com Committed by David S. Miller
Browse files

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: default avatarNikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb95ec62
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1901,6 +1901,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
	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);