We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c691ea commit fa4749cCopy full SHA for fa4749c
net/ipv4/tcp.c
@@ -3286,6 +3286,7 @@ int tcp_disconnect(struct sock *sk, int flags)
3286
struct inet_connection_sock *icsk = inet_csk(sk);
3287
struct tcp_sock *tp = tcp_sk(sk);
3288
int old_state = sk->sk_state;
3289
+ struct request_sock *req;
3290
u32 seq;
3291
3292
if (old_state != TCP_CLOSE)
@@ -3400,6 +3401,10 @@ int tcp_disconnect(struct sock *sk, int flags)
3400
3401
3402
3403
/* Clean up fastopen related fields */
3404
+ req = rcu_dereference_protected(tp->fastopen_rsk,
3405
+ lockdep_sock_is_held(sk));
3406
+ if (req)
3407
+ reqsk_fastopen_remove(sk, req, false);
3408
tcp_free_fastopen_req(tp);
3409
inet_clear_bit(DEFER_CONNECT, sk);
3410
tp->fastopen_client_fail = 0;
0 commit comments