mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
7422156369
commit
5b7ff64f50
@ -358,7 +358,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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user