1. 27 1月, 2015 39 次提交
  2. 26 1月, 2015 1 次提交
    • E
      ipv6: tcp: fix race in IPV6_2292PKTOPTIONS · 1dc7b90f
      Eric Dumazet 提交于
      IPv6 TCP sockets store in np->pktoptions skbs, and use skb_set_owner_r()
      to charge the skb to socket.
      
      It means that destructor must be called while socket is locked.
      
      Therefore, we cannot use skb_get() or atomic_inc(&skb->users)
      to protect ourselves : kfree_skb() might race with other users
      manipulating sk->sk_forward_alloc
      
      Fix this race by holding socket lock for the duration of
      ip6_datagram_recv_ctl()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1dc7b90f