Skip to content

tcp: fix a few divide-by-zero in congestion control modules

Jiayuan Chen lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Patch 3: spell out the divide by zero in the commit message (Kuba, Neal), read beta once with READ_ONCE() (Eric).
v2: https://lore.kernel.org/netdev/[email protected]/

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3tcp_bic: fix divide by zero on max_increment == 0net/ipv4/tcp_bic.c+12 -20 repliesApplied
2/3tcp_hybla: fix divide by zero on rtt0 == 0net/ipv4/tcp_hybla.c+14 -20 repliesApplied
3/3tcp_cubic: fix divide by zero and endless loop on bad module paramsnet/ipv4/tcp_cubic.c+12 -20 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Dumazet
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] tcp: fix a few divide-by-zero in congestion control modules

Patch 1 and 2 were reported by VEGA <[email protected]>.

Patch 3 was found while reviewing the other TCP congestion control modules for the same kind of divide-by-zero on module parameters.

Target net-next since it is not a big problem.

v2 -> v3:
- Patch 3: spell out the divide by zero in the commit message (Kuba, Neal), read beta once with READ_ONCE() (Eric).
v2: https://lore.kernel.org/netdev/[email protected]/

v1 -> v2:
- Patch 3: rework as suggested by Eric.
- Patch 1 and 2: add Eric's Reviewed-by.
v1: https://lore.kernel.org/netdev/[email protected]/

Jiayuan Chen (3):
tcp_bic: fix divide by zero on max_increment == 0
tcp_hybla: fix divide by zero on rtt0 == 0
tcp_cubic: fix divide by zero and endless loop on bad module params

 net/ipv4/tcp_bic.c   | 14 ++++++++++++--
 net/ipv4/tcp_cubic.c | 14 ++++++++++++--
 net/ipv4/tcp_hybla.c | 16 ++++++++++++++--
 3 files changed, 38 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0