aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2018-11-28 16:06:43 -0800
committerDavid S. Miller <davem@davemloft.net>2018-11-30 17:22:41 -0800
commit3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 (patch)
treef0dd1d7bf303e1a7b4bc668ccdcf24bc041ae0b2 /net/ipv4/tcp_timer.c
parentliquidio: read sc->iq_no before release sc (diff)
downloadlinux-dev-3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188.tar.xz
linux-dev-3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188.zip
tcp: fix off-by-one bug on aborting window-probing socket
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>
Diffstat (limited to '')
-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 091c53925e4d..25efdae4368a 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. */