diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b2ac4f074e2d..42187a3b82f4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -3842,8 +3842,12 @@ void tcp_done(struct sock *sk) | |||
3842 | { | 3842 | { |
3843 | struct request_sock *req; | 3843 | struct request_sock *req; |
3844 | 3844 | ||
3845 | req = rcu_dereference_protected(tcp_sk(sk)->fastopen_rsk, | 3845 | /* We might be called with a new socket, after |
3846 | lockdep_sock_is_held(sk)); | 3846 | * inet_csk_prepare_forced_close() has been called |
3847 | * so we can not use lockdep_sock_is_held(sk) | ||
3848 | */ | ||
3849 | req = rcu_dereference_protected(tcp_sk(sk)->fastopen_rsk, 1); | ||
3850 | |||
3847 | if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) | 3851 | if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) |
3848 | TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); | 3852 | TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); |
3849 | 3853 | ||