lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351219727-6085-1-git-send-email-windsdaemon@gmail.com>
Date:	Fri, 26 Oct 2012 10:48:47 +0800
From:	Jing Wang <windsdaemon@...il.com>
To:	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Pavel Emelyanov <xemul@...allels.com>
Cc:	netdev@...r.kernel.org, Jing Wang <windsdaemon@...il.com>
Subject: [PATCH 1/1] af_unix.c: fix the compile warning in unix_bind


Signed-off-by: Jing Wang <windsdaemon@...il.com>
---
 net/unix/af_unix.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 5b5c876..3f7d9d5 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -860,6 +860,8 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 	unsigned int hash;
 	struct unix_address *addr;
 	struct hlist_head *list;
+	struct path path;
+	umode_t mode;
 
 	err = -EINVAL;
 	if (sunaddr->sun_family != AF_UNIX)
@@ -890,11 +892,12 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 	addr->len = addr_len;
 	addr->hash = hash ^ sk->sk_type;
 	atomic_set(&addr->refcnt, 1);
-
+
 	if (sun_path[0]) {
-		struct path path;
-		umode_t mode = S_IFSOCK |
+		mode = S_IFSOCK |
 		       (SOCK_INODE(sock)->i_mode & ~current_umask());
+
+		memset(&path, 0, sizeof(path));
 		err = unix_mknod(sun_path, mode, &path);
 		if (err) {
 			if (err == -EEXIST)
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ