diff options
author | Eric Dumazet <edumazet@google.com> | 2013-04-24 18:34:55 -0700 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-05-20 13:47:15 -0400 |
commit | 56b1ba8fa17141e67d6c142ecc30bd1a5801e0a9 (patch) | |
tree | cd93b9a629bdcf0370f056aa0678fd80f4692484 /include | |
parent | c89f2a9ad4818ec3c23db2a9f349f24e9a1100b0 (diff) |
tcp: force a dst refcount when prequeue packet
Before escaping RCU protected section and adding packet into
prequeue, make sure the dst is refcounted.
Cc: stable-rt@vger.kernel.org
Reported-by: Mike Galbraith <bitbucket@online.de>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-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 0768715ee4dd..fe4601960344 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -931,6 +931,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) { |