From: Nikolay Aleksandrov <nikolay@redhat.com>
To: netdev@vger.kernel.org
Cc: andy@greyhouse.net, fubar@us.ibm.com, davem@davemloft.net
Subject: [PATCHv2 2/2] bonding: IFF_BONDING is not stripped on enslave failure
Date: Thu, 11 Apr 2013 21:18:56 +0200 [thread overview]
Message-ID: <1365707936-5073-3-git-send-email-nikolay@redhat.com> (raw)
In-Reply-To: <1365707936-5073-1-git-send-email-nikolay@redhat.com>
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>
---
drivers/net/bonding/bond_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 15c675c..232b129 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1906,6 +1906,7 @@ err_detach:
write_unlock_bh(&bond->lock);
err_close:
+ slave_dev->priv_flags &= ~IFF_BONDING;
dev_close(slave_dev);
err_unset_master:
--
1.8.1.4
next prev parent reply other threads:[~2013-04-11 19:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 19:18 [PATCHv2 0/2] bonding: NULL pointer dereference and flag strip fixes Nikolay Aleksandrov
2013-04-11 19:18 ` [PATCHv2 1/2] bonding: fix netdev event NULL pointer dereference Nikolay Aleksandrov
2013-04-11 19:18 ` Nikolay Aleksandrov [this message]
2013-04-11 20:02 ` [PATCHv2 0/2] bonding: NULL pointer dereference and flag strip fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365707936-5073-3-git-send-email-nikolay@redhat.com \
--to=nikolay@redhat.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).