diff options
author | Eric Dumazet <edumazet@google.com> | 2013-04-24 18:34:55 -0700 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-05-02 21:15:51 -0400 |
commit | 32bd2c407ffda7f34ae9190d1e87aaaa15dab257 (patch) | |
tree | d1f7cb1488913e7c34d36e0a6b97b8c1c9d553f7 /include | |
parent | 4ae7999b983db4ec0cd79a522cbe00ef28af8af2 (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 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) { |