]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bridge: bad error handling when adding invalid ether address
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 26 Mar 2009 04:01:47 +0000 (21:01 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:23:47 +0000 (10:23 -0700)
commitdda311d8409e188023b072bf7dc0b1de11b7f011
tree27aadc3a1af14066deed9c8af137614717feb95e
parent83e2cc9bc55d188f8ddd9fb22e6eb71608311a72
bridge: bad error handling when adding invalid ether address

[ Upstream commit cda6d377ec6b2ee2e58d563d0bd7eb313e0165df ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/bridge/br_if.c