aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 779d40c3b96e..d5f84bd5a455 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1898,6 +1898,10 @@ void tcp_close(struct sock *sk, long timeout)
1898 1898
1899 sk_mem_reclaim(sk); 1899 sk_mem_reclaim(sk);
1900 1900
1901 /* If socket has been already reset (e.g. in tcp_reset()) - kill it. */
1902 if (sk->sk_state == TCP_CLOSE)
1903 goto adjudge_to_death;
1904
1901 /* As outlined in RFC 2525, section 2.17, we send a RST here because 1905 /* As outlined in RFC 2525, section 2.17, we send a RST here because
1902 * data was lost. To witness the awful effects of the old behavior of 1906 * data was lost. To witness the awful effects of the old behavior of
1903 * always doing a FIN, run an older 2.1.x kernel or 2.0.x, start a bulk 1907 * always doing a FIN, run an older 2.1.x kernel or 2.0.x, start a bulk