Re: [PATCH net v2] tcp: make probe0 timer handle expired user timeout

From: Eric Dumazet

Date: Mon Apr 27 2026 - 03:40:56 EST


On Thu, Apr 23, 2026 at 6:46 PM Altan Hacigumus <ahacigu.linux@xxxxxxxxx> wrote:
>
> tcp_clamp_probe0_to_user_timeout() computes remaining time in jiffies
> using subtraction with an unsigned lvalue. If elapsed probing time
> exceeds the configured TCP_USER_TIMEOUT, the underflow yields a large
> value.
>
> This ends up re-arming the probe timer for a full backoff interval
> instead of expiring immediately, delaying connection teardown beyond
> the configured timeout.
>
> Fix this by preventing underflow so user-set timeout expiration is
> handled correctly without extending the probe timer.
>
> Fixes: 344db93ae3ee ("tcp: make TCP_USER_TIMEOUT accurate for zero window probes")
> Link: https://lore.kernel.org/r/20260414013634.43997-1-ahacigu.linux@xxxxxxxxx
> Signed-off-by: Altan Hacigumus <ahacigu.linux@xxxxxxxxx>
> ---

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>