提交 88f8598d 编写于 作者: Y Yuchung Cheng 提交者: David S. Miller

tcp: exit if nothing to retransmit on RTO timeout

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: NYuchung Cheng <ycheng@google.com>
Signed-off-by: NEric Dumazet <edumazet@google.com>
Reviewed-by: NNeal Cardwell <ncardwell@google.com>
Reviewed-by: NSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9b420eff
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部