summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2018-11-28 16:06:43 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 08:52:19 +0100
commit85b03cfe31befc481e1da603d888517da2e30409 (patch)
tree763a8406d9169dbeb4bcff28f5f802bdbdbb8269 /net
parent47d83feb885e2dfa625f0cd50829ea10bd5902e2 (diff)
downloadlinux-stable-85b03cfe31befc481e1da603d888517da2e30409.tar.gz
linux-stable-85b03cfe31befc481e1da603d888517da2e30409.tar.bz2
linux-stable-85b03cfe31befc481e1da603d888517da2e30409.zip
tcp: fix off-by-one bug on aborting window-probing socket
[ Upstream commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 ] Previously there is an off-by-one bug on determining when to abort a stalled window-probing socket. This patch fixes that so it is consistent with tcp_write_timeout(). Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index c719a41d2eba..50b15e1c633b 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -378,7 +378,7 @@ static void tcp_probe_timer(struct sock *sk)
return;
}
- if (icsk->icsk_probes_out > max_probes) {
+ if (icsk->icsk_probes_out >= max_probes) {
abort: tcp_write_err(sk);
} else {
/* Only send another probe if we didn't close things up. */