aboutsummaryrefslogtreecommitdiffstats
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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index a427623ee574..29fc8bee9702 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -80,6 +80,8 @@
80 * with BSD names. 80 * with BSD names.
81 */ 81 */
82 82
83#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
84
83#include <linux/module.h> 85#include <linux/module.h>
84#include <linux/kernel.h> 86#include <linux/kernel.h>
85#include <linux/signal.h> 87#include <linux/signal.h>
@@ -366,7 +368,7 @@ static void unix_sock_destructor(struct sock *sk)
366 WARN_ON(!sk_unhashed(sk)); 368 WARN_ON(!sk_unhashed(sk));
367 WARN_ON(sk->sk_socket); 369 WARN_ON(sk->sk_socket);
368 if (!sock_flag(sk, SOCK_DEAD)) { 370 if (!sock_flag(sk, SOCK_DEAD)) {
369 printk(KERN_INFO "Attempt to release alive unix socket: %p\n", sk); 371 pr_info("Attempt to release alive unix socket: %p\n", sk);
370 return; 372 return;
371 } 373 }
372 374
@@ -378,7 +380,7 @@ static void unix_sock_destructor(struct sock *sk)
378 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); 380 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
379 local_bh_enable(); 381 local_bh_enable();
380#ifdef UNIX_REFCNT_DEBUG 382#ifdef UNIX_REFCNT_DEBUG
381 printk(KERN_DEBUG "UNIX %p is destroyed, %ld are still alive.\n", sk, 383 pr_debug("UNIX %p is destroyed, %ld are still alive.\n", sk,
382 atomic_long_read(&unix_nr_socks)); 384 atomic_long_read(&unix_nr_socks));
383#endif 385#endif
384} 386}
@@ -1448,7 +1450,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
1448 struct sock *sk = sock->sk; 1450 struct sock *sk = sock->sk;
1449 struct net *net = sock_net(sk); 1451 struct net *net = sock_net(sk);
1450 struct unix_sock *u = unix_sk(sk); 1452 struct unix_sock *u = unix_sk(sk);
1451 struct sockaddr_un *sunaddr = msg->msg_name; 1453 DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, msg->msg_name);
1452 struct sock *other = NULL; 1454 struct sock *other = NULL;
1453 int namelen = 0; /* fake GCC */ 1455 int namelen = 0; /* fake GCC */
1454 int err; 1456 int err;
@@ -1910,7 +1912,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
1910 struct scm_cookie tmp_scm; 1912 struct scm_cookie tmp_scm;
1911 struct sock *sk = sock->sk; 1913 struct sock *sk = sock->sk;
1912 struct unix_sock *u = unix_sk(sk); 1914 struct unix_sock *u = unix_sk(sk);
1913 struct sockaddr_un *sunaddr = msg->msg_name; 1915 DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, msg->msg_name);
1914 int copied = 0; 1916 int copied = 0;
1915 int check_creds = 0; 1917 int check_creds = 0;
1916 int target; 1918 int target;
@@ -2441,8 +2443,7 @@ static int __init af_unix_init(void)
2441 2443
2442 rc = proto_register(&unix_proto, 1); 2444 rc = proto_register(&unix_proto, 1);
2443 if (rc != 0) { 2445 if (rc != 0) {
2444 printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n", 2446 pr_crit("%s: Cannot create unix_sock SLAB cache!\n", __func__);
2445 __func__);
2446 goto out; 2447 goto out;
2447 } 2448 }
2448 2449