diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5266ea7b922b..941b3d26e3bf 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -620,7 +620,7 @@ static struct proto unix_proto = { | |||
620 | */ | 620 | */ |
621 | static struct lock_class_key af_unix_sk_receive_queue_lock_key; | 621 | static struct lock_class_key af_unix_sk_receive_queue_lock_key; |
622 | 622 | ||
623 | static struct sock *unix_create1(struct net *net, struct socket *sock) | 623 | static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) |
624 | { | 624 | { |
625 | struct sock *sk = NULL; | 625 | struct sock *sk = NULL; |
626 | struct unix_sock *u; | 626 | struct unix_sock *u; |
@@ -629,7 +629,7 @@ static struct sock *unix_create1(struct net *net, struct socket *sock) | |||
629 | if (atomic_long_read(&unix_nr_socks) > 2 * get_max_files()) | 629 | if (atomic_long_read(&unix_nr_socks) > 2 * get_max_files()) |
630 | goto out; | 630 | goto out; |
631 | 631 | ||
632 | sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto); | 632 | sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto, kern); |
633 | if (!sk) | 633 | if (!sk) |
634 | goto out; | 634 | goto out; |
635 | 635 | ||
@@ -688,7 +688,7 @@ static int unix_create(struct net *net, struct socket *sock, int protocol, | |||
688 | return -ESOCKTNOSUPPORT; | 688 | return -ESOCKTNOSUPPORT; |
689 | } | 689 | } |
690 | 690 | ||
691 | return unix_create1(net, sock) ? 0 : -ENOMEM; | 691 | return unix_create1(net, sock, kern) ? 0 : -ENOMEM; |
692 | } | 692 | } |
693 | 693 | ||
694 | static int unix_release(struct socket *sock) | 694 | static int unix_release(struct socket *sock) |
@@ -1088,7 +1088,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1088 | err = -ENOMEM; | 1088 | err = -ENOMEM; |
1089 | 1089 | ||
1090 | /* create new sock for complete connection */ | 1090 | /* create new sock for complete connection */ |
1091 | newsk = unix_create1(sock_net(sk), NULL); | 1091 | newsk = unix_create1(sock_net(sk), NULL, 0); |
1092 | if (newsk == NULL) | 1092 | if (newsk == NULL) |
1093 | goto out; | 1093 | goto out; |
1094 | 1094 | ||