summaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index a45a9f7369ed..3a35a6e8bf91 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -615,9 +615,11 @@ static struct sock *unix_create1(struct net *net, struct socket *sock)
out:
if (sk == NULL)
atomic_dec(&unix_nr_socks);
- else
+ else {
+ local_bh_disable();
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
-
+ local_bh_enable();
+ }
return sk;
}
OpenPOWER on IntegriCloud