tcp: force a dst refcount when prequeue packet
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>
This commit is contained in:
Родитель
d2cb6ce730
Коммит
093162553c
|
@ -1049,6 +1049,7 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)
|
||||||
skb_queue_len(&tp->ucopy.prequeue) == 0)
|
skb_queue_len(&tp->ucopy.prequeue) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
skb_dst_force(skb);
|
||||||
__skb_queue_tail(&tp->ucopy.prequeue, skb);
|
__skb_queue_tail(&tp->ucopy.prequeue, skb);
|
||||||
tp->ucopy.memory += skb->truesize;
|
tp->ucopy.memory += skb->truesize;
|
||||||
if (tp->ucopy.memory > sk->sk_rcvbuf) {
|
if (tp->ucopy.memory > sk->sk_rcvbuf) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче