diff options
author | Eric Dumazet <edumazet@google.com> | 2021-11-15 20:11:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 10:14:08 +0300 |
commit | c8f2ebbb0e0cc2d363dd95e5222f079f8308dd3d (patch) | |
tree | 14ba1ed9b71cd7da6f9ce49378f8a55c2951cfd0 /net/packet | |
parent | aa4ed1e0f6cc7287d7b5bd37f5c0e265ecbdf960 (diff) | |
download | linux-c8f2ebbb0e0cc2d363dd95e5222f079f8308dd3d.tar.xz |
net: drop nopreempt requirement on sock_prot_inuse_add()
[ Upstream commit b3cb764aa1d753cf6a58858f9e2097ba71e8100b ]
This is distracting really, let's make this simpler,
because many callers had to take care of this
by themselves, even if on x86 this adds more
code than really needed.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: a9bf9c7dc6a5 ("af_unix: Annotate data-race of sk->sk_state in unix_stream_connect().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 0ab3b09f863b..4f920502f92f 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3092,9 +3092,7 @@ static int packet_release(struct socket *sock) sk_del_node_init_rcu(sk); mutex_unlock(&net->packet.sklist_lock); - preempt_disable(); sock_prot_inuse_add(net, sk->sk_prot, -1); - preempt_enable(); spin_lock(&po->bind_lock); unregister_prot_hook(sk, false); @@ -3361,9 +3359,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol, sk_add_node_tail_rcu(sk, &net->packet.sklist); mutex_unlock(&net->packet.sklist_lock); - preempt_disable(); sock_prot_inuse_add(net, &packet_proto, 1); - preempt_enable(); return 0; out2: |