]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pppoe: drop PPPOX_ZOMBIEs in pppoe_release
authorXiaodong Xu <stid.smth@gmail.com>
Sat, 22 Sep 2012 00:09:32 +0000 (00:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:28:07 +0000 (05:28 +0900)
[ Upstream commit 2b018d57ff18e5405823e5cb59651a5b4d946d7b ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/pppoe.c

index bc9a4bb31980f1758a38e38daebdc5a7ab8f2a12..11615842a57bd9b5211f8f23c78b2c8248f16a03 100644 (file)
@@ -576,7 +576,7 @@ static int pppoe_release(struct socket *sock)
 
        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;
        }