diff options
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index dbcf34ec8dd2..eb30fc1770de 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -906,7 +906,7 @@ static void inet_child_forget(struct sock *sk, struct request_sock *req, | |||
906 | percpu_counter_inc(sk->sk_prot->orphan_count); | 906 | percpu_counter_inc(sk->sk_prot->orphan_count); |
907 | 907 | ||
908 | if (sk->sk_protocol == IPPROTO_TCP && tcp_rsk(req)->tfo_listener) { | 908 | if (sk->sk_protocol == IPPROTO_TCP && tcp_rsk(req)->tfo_listener) { |
909 | BUG_ON(tcp_sk(child)->fastopen_rsk != req); | 909 | BUG_ON(rcu_access_pointer(tcp_sk(child)->fastopen_rsk) != req); |
910 | BUG_ON(sk != req->rsk_listener); | 910 | BUG_ON(sk != req->rsk_listener); |
911 | 911 | ||
912 | /* Paranoid, to prevent race condition if | 912 | /* Paranoid, to prevent race condition if |
@@ -915,7 +915,7 @@ static void inet_child_forget(struct sock *sk, struct request_sock *req, | |||
915 | * Also to satisfy an assertion in | 915 | * Also to satisfy an assertion in |
916 | * tcp_v4_destroy_sock(). | 916 | * tcp_v4_destroy_sock(). |
917 | */ | 917 | */ |
918 | tcp_sk(child)->fastopen_rsk = NULL; | 918 | RCU_INIT_POINTER(tcp_sk(child)->fastopen_rsk, NULL); |
919 | } | 919 | } |
920 | inet_csk_destroy_sock(child); | 920 | inet_csk_destroy_sock(child); |
921 | } | 921 | } |