mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
Revert "net: set SOCK_RCU_FREE before inserting socket into hashtable"
This reverts commit 6c71b9b177 which is
commit 871019b22d1bcc9fab2d1feba1b9a564acbb6e99 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ia61632b09de4a97dbc231e242f7315d798bf5e96
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -609,12 +609,12 @@ int __inet_hash(struct sock *sk, struct sock *osk)
|
||||
if (err)
|
||||
goto unlock;
|
||||
}
|
||||
sock_set_flag(sk, SOCK_RCU_FREE);
|
||||
if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
|
||||
sk->sk_family == AF_INET6)
|
||||
__sk_nulls_add_node_tail_rcu(sk, &ilb2->nulls_head);
|
||||
else
|
||||
__sk_nulls_add_node_rcu(sk, &ilb2->nulls_head);
|
||||
sock_set_flag(sk, SOCK_RCU_FREE);
|
||||
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
|
||||
unlock:
|
||||
spin_unlock(&ilb2->lock);
|
||||
|
||||
Reference in New Issue
Block a user