summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-06-13 22:13:38 +0200
committerJakub Kicinski <kuba@kernel.org>2024-06-13 22:13:46 +0200
commit4c7d3d79c736186bb2585f2d0a8231e1fac839da (patch)
tree5abd973d57d360e24c9df2f17e942176ab2faaa5 /net/ipv4
parentCDC-NCM: add support for Apple's private interface (diff)
parentMerge tag 'net-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadlinux-4c7d3d79c736186bb2585f2d0a8231e1fac839da.tar.xz
linux-4c7d3d79c736186bb2585f2d0a8231e1fac839da.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts, no adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_timer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 3e8604ae7d06..ab4b6de0e069 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -481,8 +481,12 @@ static bool tcp_rtx_probe0_timed_out(const struct sock *sk,
{
const struct tcp_sock *tp = tcp_sk(sk);
const int timeout = TCP_RTO_MAX * 2;
- u32 rcv_delta;
+ s32 rcv_delta;
+ /* Note: timer interrupt might have been delayed by at least one jiffy,
+ * and tp->rcv_tstamp might very well have been written recently.
+ * rcv_delta can thus be negative.
+ */
rcv_delta = inet_csk(sk)->icsk_timeout - tp->rcv_tstamp;
if (rcv_delta <= timeout)
return false;