Re: [PATCH net-next 2/3] tcp_hybla: fix divide by zero on rtt0 == 0
From: Eric Dumazet
Date: Wed Sep 30 2026 - 07:25:32 EST
On Wed, Sep 30, 2026 at 12:10 PM Jiayuan Chen <jiayuan.chen@xxxxxxxxx> wrote:
>
> rtt0 is the reference RTT in ms, so 0 makes no sense, and
> hybla_recalc_param() divides by it right from hybla_init().
>
> Reject values below 1 when the parameter is written. Also cap it at
> U32_MAX / USEC_PER_MSEC, since rtt0 * USEC_PER_MSEC can wrap to 0 on
> 32-bit. An rtt0 above that (about 71 minutes) makes no sense anyway.
>
> Fixes: 835b3f0c0d7e ("[TCP]: Add TCP Hybla congestion control module.")
> Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")
> Reported-by: VEGA <vega@xxxxxxxxxx>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>
> ---
Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>