Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b018d57 authored by Xiaodong Xu's avatar Xiaodong Xu Committed by David S. Miller
Browse files

pppoe: drop PPPOX_ZOMBIEs in pppoe_release



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: default avatarXiaodong Xu <stid.smth@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b121fd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}