diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 27e2f6837062..cf3c5095c10e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1186,7 +1186,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) | |||
1186 | flags = msg->msg_flags; | 1186 | flags = msg->msg_flags; |
1187 | 1187 | ||
1188 | if (flags & MSG_ZEROCOPY && size && sock_flag(sk, SOCK_ZEROCOPY)) { | 1188 | if (flags & MSG_ZEROCOPY && size && sock_flag(sk, SOCK_ZEROCOPY)) { |
1189 | if (sk->sk_state != TCP_ESTABLISHED) { | 1189 | if ((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) { |
1190 | err = -EINVAL; | 1190 | err = -EINVAL; |
1191 | goto out_err; | 1191 | goto out_err; |
1192 | } | 1192 | } |
@@ -2528,6 +2528,7 @@ void tcp_write_queue_purge(struct sock *sk) | |||
2528 | sk_mem_reclaim(sk); | 2528 | sk_mem_reclaim(sk); |
2529 | tcp_clear_all_retrans_hints(tcp_sk(sk)); | 2529 | tcp_clear_all_retrans_hints(tcp_sk(sk)); |
2530 | tcp_sk(sk)->packets_out = 0; | 2530 | tcp_sk(sk)->packets_out = 0; |
2531 | inet_csk(sk)->icsk_backoff = 0; | ||
2531 | } | 2532 | } |
2532 | 2533 | ||
2533 | int tcp_disconnect(struct sock *sk, int flags) | 2534 | int tcp_disconnect(struct sock *sk, int flags) |
@@ -2576,7 +2577,6 @@ int tcp_disconnect(struct sock *sk, int flags) | |||
2576 | tp->write_seq += tp->max_window + 2; | 2577 | tp->write_seq += tp->max_window + 2; |
2577 | if (tp->write_seq == 0) | 2578 | if (tp->write_seq == 0) |
2578 | tp->write_seq = 1; | 2579 | tp->write_seq = 1; |
2579 | icsk->icsk_backoff = 0; | ||
2580 | tp->snd_cwnd = 2; | 2580 | tp->snd_cwnd = 2; |
2581 | icsk->icsk_probes_out = 0; | 2581 | icsk->icsk_probes_out = 0; |
2582 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; | 2582 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; |