mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
tcp: Fix queue traversal in tcp_use_frto().
We must check tcp_skb_is_last() before doing a tcp_write_queue_next(). Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
77d40a0952
commit
28e3487b7d
1 changed files with 2 additions and 0 deletions
|
@ -1746,6 +1746,8 @@ int tcp_use_frto(struct sock *sk)
|
|||
return 0;
|
||||
|
||||
skb = tcp_write_queue_head(sk);
|
||||
if (tcp_skb_is_last(sk, skb))
|
||||
return 1;
|
||||
skb = tcp_write_queue_next(sk, skb); /* Skips head */
|
||||
tcp_for_write_queue_from(skb, sk) {
|
||||
if (skb == tcp_send_head(sk))
|
||||
|
|
Loading…
Reference in a new issue