summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorChris Mason <mason@kernel.org>2026-11-18 10:51:45 -0500
committerPaolo Abeni <pabeni@redhat.com>2026-11-19 14:47:59 +0100
commit5d2a5ad0367725f2833bbfcec25aae1e69d71ba1 (patch)
tree496623f4821e0aec34f1bf5fd460c7a37788c7ea /tools/perf/scripts/python/bin
parentabccf171fa8e97954e74934bde811d76a5410cbd (diff)
tcp: don't let __tcp_set_rto() return 0
tcp_retransmit_timer() backs off by doubling icsk_rto, so the backoff only works if icsk_rto is nonzero. __tcp_set_rto() adds srtt_us >> 3 and rttvar_us with no lower bound, and relies on tcp_rtt_estimator() to keep rttvar_us at tcp_rto_min() or above. But tcp_rto_min() returns 0 for a route with a locked RTAX_RTO_MIN of 0. A first RTT sample of 0 usec, which usec TS allows, then gives: srtt_us = max(1U, 0 << 3) = 1 rttvar_us = max(mdev_us, tcp_rto_min_us(sk)) = 0 __tcp_set_rto() = usecs_to_jiffies((1 >> 3) + 0) = 0 Keep the result from 0, so that the backoff recovers from any state of the RTT estimator. Do it in __tcp_set_rto() and not in tcp_set_rto(), since tcp_ld_RTO_revert() uses the same sum. The third caller, the linear timeouts of thin streams in tcp_retransmit_timer(), already clamps the result to tcp_rto_min(). Found by code inspection (Eric Dumazet), not reproduced. Fixed by LLM, and tested with existing kernel selftests. Fixes: 05bb1fad1cde ("[TCP]: Allow minimum RTO to be configurable via routing metrics.") Suggested-by: Eric Dumazet <edumazet@kernel.org> Signed-off-by: Chris Mason <mason@kernel.org> Link: https://patch.msgid.link/20261118155144.18393-2-mason@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions