bonding: do not activate slave twice
authorEric Kinzie <ekinzie@brocade.com>
Tue, 1 Mar 2016 17:32:02 +0000 (09:32 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 18:05:47 +0000 (19:05 +0100)
commit7a7122edf1c8d63e516d1b2c2eff6fa9b54e0f82
tree5d2f6bfe7e79f6cf917f4c6704fa737176c31e5c
parent8997a10bfcad789d000debaac4cd85cd3db57997
bonding: do not activate slave twice

The current code for detecting link during slave addition can cause a
slave interface to be activated twice -- once during slave_configure()
and again at the end of __eth_bond_slave_add_lock_free().  This will
either cause the active slave count to be incorrect or will cause the
802.3ad activation function to panic.  Ensure that the interface is not
activated more than once.

Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: Eric Kinzie <ekinzie@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
drivers/net/bonding/rte_eth_bond_api.c