mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 05:12:49 +00:00
tcp: exit if nothing to retransmit on RTO timeout
commit 88f8598d0a
upstream.
Previously TCP only warns if its RTO timer fires and the
retransmission queue is empty, but it'll cause null pointer
reference later on. It's better to avoid such catastrophic failure
and simply exit with a warning.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
95442682dd
commit
d832269ac6
1 changed files with 2 additions and 4 deletions
|
@ -443,10 +443,8 @@ void tcp_retransmit_timer(struct sock *sk)
|
|||
*/
|
||||
return;
|
||||
}
|
||||
if (!tp->packets_out)
|
||||
goto out;
|
||||
|
||||
WARN_ON(tcp_rtx_queue_empty(sk));
|
||||
if (!tp->packets_out || WARN_ON_ONCE(tcp_rtx_queue_empty(sk)))
|
||||
return;
|
||||
|
||||
tp->tlp_high_seq = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue