Thread (11 messages) 11 messages, 6 authors, 7d ago

Re: [PATCH net-next v2 3/3] tcp_cubic: fix divide by zero and endless loop on bad module params

flat view

From: Neal Cardwell <ncardwell@google.com>
Date: 2026-10-07 13:25:03
Also in: lkml

On Wed, Oct 7, 2026 at 2:49 AM Jiayuan Chen [off-list ref] wrote:

On 10/6/26 8:12 AM, Jakub Kicinski wrote:
quoted
On Thu,  1 Oct 2026 19:29:43 +0800 Jiayuan Chen wrote:
quoted
Subject: [PATCH net-next v2 3/3] tcp_cubic: fix divide by zero and endless loop on bad module params
if the LLM Medium severity complaint is true maybe also update
the subject? I thought there's an actual div by zero somewhere
but the commit msg seems to describe the inf loop


Hi Kuba, sorry for the delay.

The LLM is talking about (cwnd * beta_scale) wrapping, which needs
cwnd >= 33M packets, way past the 1M limit this code documents. So
the loop fix is fine.

The div by zero is real: beta == 1024 in "/ (BICTCP_BETA_SCALE - beta)"
and bic_scale == 0 in do_div(), both at init. The new range check in
this patch rejects both, I just did not say "divide by zero" in the
commit message.

Want me to spell this out in the commit message? I can also add the
READ_ONCE() Eric mentioned in the same respin.
Yes, please spell that out in the commit message, and please also add
the READ_ONCE() Eric mentioned in the same respin.

Thanks,
neal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help