diff options
author | Eric Dumazet <edumazet@google.com> | 2013-04-24 18:34:55 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-19 10:54:43 -0700 |
commit | 8e1546d7e14ef043ff74070cea0aff55ba2f600c (patch) | |
tree | c595d2a41d374eb4d57366553cd3f628583d6697 /include/net | |
parent | 1203d9c66e6b892bd8043eea51c5cd510d097266 (diff) |
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/net')
-rw-r--r-- | include/net/tcp.h | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |