summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-04-24 18:34:55 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-19 10:04:42 -0700
commita0464b18acc3f17ff86aa25df34c5066a21c8291 (patch)
tree0ae123ffbc405d31df28aefd767bfb863ee404c5 /include
parent875cfc6271a37f35f6334c26184b16eb70625929 (diff)
downloadlinux-stable-a0464b18acc3f17ff86aa25df34c5066a21c8291.tar.gz
linux-stable-a0464b18acc3f17ff86aa25df34c5066a21c8291.tar.bz2
linux-stable-a0464b18acc3f17ff86aa25df34c5066a21c8291.zip
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 <bitbucket@online.de> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/tcp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index b28a49f48a04..4881cb639996 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -902,6 +902,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) {