Changeset 47966


Ignore:
Timestamp:
2015-12-23T12:40:53+01:00 (2 years ago)
Author:
nbd
Message:

kernel: add remaining kernel patch accidentally left out of r47963

Signed-off-by: Felix Fietkau <nbd@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-3.18/081-06-ppp-don-t-set-sk_state-to-PPPOX_ZOMBIE-in-pppoe_disc.patch

    r47963 r47966  
     1From: Guillaume Nault <g.nault@alphalink.fr> 
     2Date: Thu, 19 Nov 2015 12:52:56 +0100 
     3Subject: [PATCH] ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv() 
     4 
     5Since 287f3a943fef ("pppoe: Use workqueue to die properly when a PADT 
     6is received"), pppoe_disc_rcv() disconnects the socket by scheduling 
     7pppoe_unbind_sock_work(). This is enough to stop socket transmission 
     8and makes the PPPOX_ZOMBIE state uncessary. 
     9 
     10Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> 
     11Signed-off-by: David S. Miller <davem@davemloft.net> 
     12--- 
     13 
     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 
     17  
     18        pn = pppoe_pernet(dev_net(dev)); 
     19        po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 
     20-       if (po) { 
     21-               struct sock *sk = sk_pppox(po); 
     22- 
     23-               bh_lock_sock(sk); 
     24- 
     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. 
     29-                */ 
     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. 
     33-                        */ 
     34-                       sk->sk_state = PPPOX_ZOMBIE; 
     35-               } 
     36- 
     37-               bh_unlock_sock(sk); 
     38+       if (po) 
     39                if (!schedule_work(&po->proto.pppoe.padt_work)) 
     40-                       sock_put(sk); 
     41-       } 
     42+                       sock_put(sk_pppox(po)); 
     43  
     44 abort: 
     45        kfree_skb(skb); 
Note: See TracChangeset for help on using the changeset viewer.