diff options
author | nikolay@redhat.com <nikolay@redhat.com> | 2013-04-11 05:18:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-11 16:01:47 -0400 |
commit | b6a5a7b9a528a8b4c8bec940b607c5dd9102b8cc (patch) | |
tree | bc29c9f5490ab363d651a73319e8073d3a92b824 /drivers/net/bonding/bond_main.c | |
parent | 6101391d4a381cc0c661d8765235b3cad7da09e5 (diff) |
bonding: IFF_BONDING is not stripped on enslave failure
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>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e074c6b55517..a61a760484f7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1906,6 +1906,7 @@ err_detach: | |||
1906 | write_unlock_bh(&bond->lock); | 1906 | write_unlock_bh(&bond->lock); |
1907 | 1907 | ||
1908 | err_close: | 1908 | err_close: |
1909 | slave_dev->priv_flags &= ~IFF_BONDING; | ||
1909 | dev_close(slave_dev); | 1910 | dev_close(slave_dev); |
1910 | 1911 | ||
1911 | err_unset_master: | 1912 | err_unset_master: |