Skip to content

Commit

Permalink
pppoe: drop PPPOX_ZOMBIEs in pppoe_release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xdxu authored and davem330 committed Sep 22, 2012
1 parent 0b121fd commit 2b018d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ppp/pppoe.c
Expand Up @@ -570,7 +570,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;
}
Expand Down

0 comments on commit 2b018d5

Please sign in to comment.