diff options
author | Eric Dumazet <edumazet@google.com> | 2013-08-06 00:10:15 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-07 17:35:05 (GMT) |
commit | 2ed0edf9090bf4afa2c6fc4f38575a85a80d4b20 (patch) | |
tree | ac245b0b7c36d13d62110e337dd33d14cf520ed4 /net/bridge | |
parent | 248ba8ec05a2c3b118c2224e57eb10c128176ab1 (diff) | |
download | linux-fsl-qoriq-2ed0edf9090bf4afa2c6fc4f38575a85a80d4b20.tar.xz |
tcp: cubic: fix overflow error in bictcp_update()
commit 17a6e9f1aa9 ("tcp_cubic: fix clock dependency") added an
overflow error in bictcp_update() in following code :
/* change the unit from HZ to bictcp_HZ */
t = ((tcp_time_stamp + msecs_to_jiffies(ca->delay_min>>3) -
ca->epoch_start) << BICTCP_HZ) / HZ;
Because msecs_to_jiffies() being unsigned long, compiler does
implicit type promotion.
We really want to constrain (tcp_time_stamp - ca->epoch_start)
to a signed 32bit value, or else 't' has unexpected high values.
This bugs triggers an increase of retransmit rates ~24 days after
boot [1], as the high order bit of tcp_time_stamp flips.
[1] for hosts with HZ=1000
Big thanks to Van Jacobson for spotting this problem.
Diagnosed-by: Van Jacobson <vanj@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
0 files changed, 0 insertions, 0 deletions