[2/2] bonding: IFF_BONDING is not stripped on enslave failure

Submitted by Nikolay Aleksandrov on April 9, 2013, 8:17 p.m.


Message ID 1365538644-1502-2-git-send-email-nikolay@redhat.com
State Changes Requested
Delegated to: David Miller
Headers show

Commit Message

Nikolay Aleksandrov April 9, 2013, 8:17 p.m.
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().

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
 drivers/net/bonding/bond_main.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 9995ddc..0d9ee48 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1906,6 +1906,7 @@  err_detach:
+	slave_dev->priv_flags &= ~IFF_BONDING;