]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bonding: IFF_BONDING is not stripped on enslave failure
authornikolay@redhat.com <nikolay@redhat.com>
Thu, 11 Apr 2013 09:18:56 +0000 (09:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 May 2013 16:46:17 +0000 (09:46 -0700)
[ Upstream commit b6a5a7b9a528a8b4c8bec940b607c5dd9102b8cc ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_main.c

index 00299f5a021fd26d269601305ece50c542fabe77..1ad01aaba1c81ed1dd91e2beb4595b166e23cd66 100644 (file)
@@ -1888,6 +1888,7 @@ err_detach:
        write_unlock_bh(&bond->lock);
 
 err_close:
+       slave_dev->priv_flags &= ~IFF_BONDING;
        dev_close(slave_dev);
 
 err_unset_master: