lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 04/45] bridge: bad error handling when adding invalid ether address
    -stable review patch.  If anyone has any objections, please let us know.
    ---------------------

    From: Stephen Hemminger <shemminger@vyatta.com>

    [ 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: Chris Wright <chrisw@sous-sol.org>
    ---
    net/bridge/br_if.c | 1 -
    1 file changed, 1 deletion(-)

    --- a/net/bridge/br_if.c
    +++ b/net/bridge/br_if.c
    @@ -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);


    \
     
     \ /
      Last update: 2009-04-01 01:29    [W:7.316 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site