Skip to content

Commit

Permalink
bonding: IFF_BONDING is not stripped on enslave failure
Browse files Browse the repository at this point in the history
While enslaving a new device and after IFF_BONDING flag is set, in case
of failure it is not stripped from the device's priv_flags while
cleaning up, which could lead to other problems.
Cleaning at err_close because the flag is set after dev_open().

v2: no change

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
nikolay@redhat.com authored and David S. Miller committed Apr 11, 2013
1 parent 6101391 commit b6a5a7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
write_unlock_bh(&bond->lock);

err_close:
slave_dev->priv_flags &= ~IFF_BONDING;
dev_close(slave_dev);

err_unset_master:
Expand Down

0 comments on commit b6a5a7b

Please sign in to comment.