mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:50:59 +07:00
TCP: tcp_hybla: Fix integer overflow in slow start increment
For large values of rtt, 2^rho operation may overflow u32. Clamp down the increment to 2^16. Signed-off-by: Daniele Lacamera <root@danielinux.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
33c29dde7d
commit
edafe50240
@ -126,8 +126,8 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
|
||||
* calculate 2^fract in a <<7 value.
|
||||
*/
|
||||
is_slowstart = 1;
|
||||
increment = ((1 << ca->rho) * hybla_fraction(rho_fractions))
|
||||
- 128;
|
||||
increment = ((1 << min(ca->rho, 16U)) *
|
||||
hybla_fraction(rho_fractions)) - 128;
|
||||
} else {
|
||||
/*
|
||||
* congestion avoidance
|
||||
|
Loading…
Reference in New Issue
Block a user