summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorLiu Yu <allanyuliu@tencent.com>2014-04-30 13:34:09 +0400
committerJiri Slaby <jslaby@suse.cz>2014-05-29 13:49:26 +0400
commite78282a5759165273c4a704c842dc808e85b1780 (patch)
tree183d312ec66d58106607793da89fb8045e773b1e /include/net
parent04adf0fb0c5a2d52279ff6a2215dad9187bc9890 (diff)
downloadlinux-e78282a5759165273c4a704c842dc808e85b1780.tar.xz
tcp_cubic: fix the range of delayed_ack
[ Upstream commit 0cda345d1b2201dd15591b163e3c92bad5191745 ] commit b9f47a3aaeab (tcp_cubic: limit delayed_ack ratio to prevent divide error) try to prevent divide error, but there is still a little chance that delayed_ack can reach zero. In case the param cnt get negative value, then ratio+cnt would overflow and may happen to be zero. As a result, min(ratio, ACK_RATIO_LIMIT) will calculate to be zero. In some old kernels, such as 2.6.32, there is a bug that would pass negative param, which then ultimately leads to this divide error. commit 5b35e1e6e9c (tcp: fix tcp_trim_head() to adjust segment count with skb MSS) fixed the negative param issue. However, it's safe that we fix the range of delayed_ack as well, to make sure we do not hit a divide by zero. CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Liu Yu <allanyuliu@tencent.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions