From: Eric Dumazet Date: Thu, 25 Apr 2013 01:34:55 +0000 (-0700) Subject: tcp: force a dst refcount when prequeue packet X-Git-Tag: v3.4.46~26 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=8e1546d7e14ef043ff74070cea0aff55ba2f600c;p=unionfs-2.6.38.y.git tcp: force a dst refcount when prequeue packet [ Upstream commit 093162553c33e9479283e107b4431378271c735d ] Before escaping RCU protected section and adding packet into prequeue, make sure the dst is refcounted. Reported-by: Mike Galbraith Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/net/tcp.h b/include/net/tcp.h index 2757a115514..8376a6a5df4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -948,6 +948,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) if (sysctl_tcp_low_latency || !tp->ucopy.task) return 0; + skb_dst_force(skb); __skb_queue_tail(&tp->ucopy.prequeue, skb); tp->ucopy.memory += skb->truesize; if (tp->ucopy.memory > sk->sk_rcvbuf) {