lkml.org 
[lkml]   [2012]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH] pppoe: drop PPPOX_ZOMBIEs in pppoe_release
    From
    From: Xiaodong Xu <stid.smth@gmail.com>

    When PPPOE is running over a virtual ethernet interface (e.g., a
    bonding interface) and the user tries to delete the interface in case
    the PPPOE state is ZOMBIE, the kernel will loop forever while
    unregistering net_device for the reference count is not decreased to
    zero which should have been done with dev_put().

    Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>

    ---

    --- linux/drivers/net/ppp/pppoe.c.orig 2012-09-19 11:49:27.921826868 +0800
    +++ linux/drivers/net/ppp/pppoe.c 2012-09-22 17:44:03.642730082 +0800
    @@ -570,7 +570,7 @@ static int pppoe_release(struct socket *

    po = pppox_sk(sk);

    - if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
    + if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
    dev_put(po->pppoe_dev);
    po->pppoe_dev = NULL;
    }
    --
    Regards,
    Xiaodong Xu


    \
     
     \ /
      Last update: 2012-09-22 12:41    [W:3.421 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site