tcp_nv: fix division by zero in tcpnv_acked()
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Wed, 1 Nov 2017 13:32:15 +0000 (16:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Nov 2017 07:35:55 +0000 (08:35 +0100)
commitfda29ee84637310f3eab1d867062388015afd122
tree7af2790c03813851d42726f053d359ee9399846a
parente5dc37a098176b75c646baaef2abba15e722d530
tcp_nv: fix division by zero in tcpnv_acked()

[ Upstream commit 4eebff27ca4182bbf5f039dd60d79e2d7c0a707e ]

Average RTT could become zero. This happened in real life at least twice.
This patch treats zero as 1us.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Lawrence Brakmo <Brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_nv.c