From: Weongyo Jeong <weongyo.linux@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH] inet: set `error' value not under lock_sock().
Date: Wed, 9 Mar 2016 10:22:21 -0800 [thread overview]
Message-ID: <20160309182217.GA9708@jwg> (raw)
A trivial patch to set `error' variable while not holding
lock_sock().
Signed-off-by: Weongyo Jeong <weongyo.linux@gmail.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
next reply other threads:[~2016-03-09 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 18:22 Weongyo Jeong [this message]
2016-03-09 20:37 ` [PATCH] inet: set `error' value not under lock_sock() David Miller
2016-03-09 22:46 ` Weongyo Jeong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160309182217.GA9708@jwg \
--to=weongyo.linux@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=wjeong@barracuda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).