diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-26 00:01:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-26 00:01:47 -0400 |
commit | cda6d377ec6b2ee2e58d563d0bd7eb313e0165df (patch) | |
tree | 9c3f3b1081ce04a9056d3f31675d7d16146c0127 /net | |
parent | c80dd2da736ba235c2ca5dcaa00aac6907786c5b (diff) |
bridge: bad error handling when adding invalid ether address
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_if.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 727c5c510a60..8a96672e2c5c 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -426,7 +426,6 @@ err2: | |||
426 | err1: | 426 | err1: |
427 | kobject_del(&p->kobj); | 427 | kobject_del(&p->kobj); |
428 | err0: | 428 | err0: |
429 | kobject_put(&p->kobj); | ||
430 | dev_set_promiscuity(dev, -1); | 429 | dev_set_promiscuity(dev, -1); |
431 | put_back: | 430 | put_back: |
432 | dev_put(dev); | 431 | dev_put(dev); |