From: David Howells <dhowells@redhat.com>
To: linux-afs@lists.infradead.org
Cc: dhowells@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] rxrpc: The RXRPC_ACCEPT control message should not have an address
Date: Tue, 12 Apr 2016 16:05:48 +0100 [thread overview]
Message-ID: <20160412150548.20637.14972.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20160412150533.20637.23952.stgit@warthog.procyon.org.uk>
When sendmsg() is called with the RXRPC_ACCEPT control message, sendmsg()
shouldn't also be given an address in msg_name.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-output.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
index b87fda075b45..044de9bf34a4 100644
--- a/net/rxrpc/ar-output.c
+++ b/net/rxrpc/ar-output.c
@@ -199,7 +199,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
return ret;
if (cmd == RXRPC_CMD_ACCEPT) {
- if (rx->sk.sk_state != RXRPC_SERVER_LISTENING)
+ if (rx->sk.sk_state != RXRPC_SERVER_LISTENING ||
+ msg->msg_name)
return -EINVAL;
call = rxrpc_accept_call(rx, user_call_ID);
if (IS_ERR(call))
next prev parent reply other threads:[~2016-04-12 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 15:05 [PATCH 0/3] RxRPC: 2nd rewrite part 2 David Howells
2016-04-12 15:05 ` [PATCH 1/3] rxrpc: Don't permit use of connect() op and simplify sendmsg() op David Howells
2016-04-15 1:07 ` David Miller
2016-04-15 3:26 ` David Howells
2016-04-12 15:05 ` David Howells [this message]
2016-04-12 15:05 ` [PATCH 3/3] rxrpc: Use the listen() system call to move to listening state David Howells
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=20160412150548.20637.14972.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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