1 From: Guillaume Nault <g.nault@alphalink.fr>
2 Date: Thu, 19 Nov 2015 12:52:56 +0100
3 Subject: [PATCH] ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
5 Since 287f3a943fef ("pppoe: Use workqueue to die properly when a PADT
6 is received"), pppoe_disc_rcv() disconnects the socket by scheduling
7 pppoe_unbind_sock_work(). This is enough to stop socket transmission
8 and makes the PPPOX_ZOMBIE state uncessary.
10 Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
14 --- a/drivers/net/ppp/pppoe.c
15 +++ b/drivers/net/ppp/pppoe.c
16 @@ -500,27 +500,9 @@ static int pppoe_disc_rcv(struct sk_buff
18 pn = pppoe_pernet(dev_net(dev));
19 po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
21 - struct sock *sk = sk_pppox(po);
25 - /* If the user has locked the socket, just ignore
26 - * the packet. With the way two rcv protocols hook into
27 - * one socket family type, we cannot (easily) distinguish
28 - * what kind of SKB it is during backlog rcv.
30 - if (sock_owned_by_user(sk) == 0) {
31 - /* We're no longer connect at the PPPOE layer,
32 - * and must wait for ppp channel to disconnect us.
34 - sk->sk_state = PPPOX_ZOMBIE;
39 if (!schedule_work(&po->proto.pppoe.padt_work))
42 + sock_put(sk_pppox(po));