Revert "net: set SOCK_RCU_FREE before inserting socket into hashtable"
This reverts commit 55d08f4214
.
This commit is contained in:
parent
179a92ca0d
commit
8f420f8031
1 changed files with 1 additions and 1 deletions
|
@ -653,7 +653,6 @@ int __inet_hash(struct sock *sk, struct sock *osk)
|
||||||
if (err)
|
if (err)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
sock_set_flag(sk, SOCK_RCU_FREE);
|
|
||||||
if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
|
if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
|
||||||
sk->sk_family == AF_INET6)
|
sk->sk_family == AF_INET6)
|
||||||
__sk_nulls_add_node_tail_rcu(sk, &ilb->nulls_head);
|
__sk_nulls_add_node_tail_rcu(sk, &ilb->nulls_head);
|
||||||
|
@ -661,6 +660,7 @@ int __inet_hash(struct sock *sk, struct sock *osk)
|
||||||
__sk_nulls_add_node_rcu(sk, &ilb->nulls_head);
|
__sk_nulls_add_node_rcu(sk, &ilb->nulls_head);
|
||||||
inet_hash2(hashinfo, sk);
|
inet_hash2(hashinfo, sk);
|
||||||
ilb->count++;
|
ilb->count++;
|
||||||
|
sock_set_flag(sk, SOCK_RCU_FREE);
|
||||||
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
|
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
|
||||||
unlock:
|
unlock:
|
||||||
spin_unlock(&ilb->lock);
|
spin_unlock(&ilb->lock);
|
||||||
|
|
Loading…
Add table
Reference in a new issue