From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: "'Stig Thormodsrud'" <stig@vyatta.com>,
netdev@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] bridge: bad error handling when adding invalid ether address
Date: Wed, 25 Mar 2009 20:57:00 -0700 [thread overview]
Message-ID: <20090325205700.1a4a7fd6@nehalam> (raw)
In-Reply-To: <062c01c9adb4$c12a8e80$b100000a@Stig>
This fixes an crash when empty bond device is added to a bridge.
If an interface with invalid ethernet address (all zero) is added
to a bridge, then bridge code detects it when setting up the forward
databas entry. But the error unwind is broken, the bridge port object
can get freed twice: once when ref count went to zeo, and once by kfree.
Since object is never really accessible, just free it.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Patch against 2.6.29, but same code has been around for a while
in older releases, so should apply to 2.6.27.y as well.
--- a/net/bridge/br_if.c 2009-03-25 20:29:08.310404430 -0700
+++ b/net/bridge/br_if.c 2009-03-25 20:48:21.353468017 -0700
@@ -426,7 +426,6 @@ err2:
err1:
kobject_del(&p->kobj);
err0:
- kobject_put(&p->kobj);
dev_set_promiscuity(dev, -1);
put_back:
dev_put(dev);
next parent reply other threads:[~2009-03-26 3:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <062c01c9adb4$c12a8e80$b100000a@Stig>
2009-03-26 3:57 ` Stephen Hemminger [this message]
2009-03-26 4:01 ` [PATCH] bridge: bad error handling when adding invalid ether address 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=20090325205700.1a4a7fd6@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stig@vyatta.com \
/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).