aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-15 09:11:50 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-16 13:20:45 +0000
commitb3cb764aa1d753cf6a58858f9e2097ba71e8100b (patch)
tree7f2d751f3ec898f8cfb48df852e8beafdb6000a6 /net/netlink
parent4199bae10c49e24bc2c5d8c06a68820d56640000 (diff)
downloadlinux-b3cb764aa1d753cf6a58858f9e2097ba71e8100b.tar.gz
net: drop nopreempt requirement on sock_prot_inuse_add()
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>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 4c575324a9852..1a19d179e913a 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -707,9 +707,7 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol,
if (err < 0)
goto out_module;
- local_bh_disable();
sock_prot_inuse_add(net, &netlink_proto, 1);
- local_bh_enable();
nlk = nlk_sk(sock->sk);
nlk->module = module;
@@ -809,9 +807,7 @@ static int netlink_release(struct socket *sock)
netlink_table_ungrab();
}
- local_bh_disable();
sock_prot_inuse_add(sock_net(sk), &netlink_proto, -1);
- local_bh_enable();
call_rcu(&nlk->rcu, deferred_put_nlk_sk);
return 0;
}