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: <20160309182217.GA9708@jwg>
Date:	Wed, 9 Mar 2016 10:22:21 -0800
From:	Weongyo Jeong <weongyo.linux@...il.com>
To:	netdev@...r.kernel.org
Subject: [PATCH] inet: set `error' value not under lock_sock().

A trivial patch to set `error' variable while not holding
lock_sock().

Signed-off-by: Weongyo Jeong <weongyo.linux@...il.com>
---
 net/ipv4/inet_connection_sock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 6414891..58bc39f 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -306,14 +306,13 @@ struct sock *inet_csk_accept(struct sock *sk, int flags, int *err)
 	struct request_sock_queue *queue = &icsk->icsk_accept_queue;
 	struct request_sock *req;
 	struct sock *newsk;
-	int error;
+	int error = -EINVAL;
 
 	lock_sock(sk);
 
 	/* We need to make sure that this socket is listening,
 	 * and that it has something pending.
 	 */
-	error = -EINVAL;
 	if (sk->sk_state != TCP_LISTEN)
 		goto out_err;
 
-- 
2.1.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ