Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1376890
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] rxrpc: The RXRPC_ACCEPT control message should not have an address |
| Date | 2016-04-12 17:10 +0200 |
| Message-ID | <rn871-W0-35@gated-at.bofh.it> (permalink) |
| References | <rn870-W0-15@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
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))
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] RxRPC: 2nd rewrite part 2 David Howells <dhowells@redhat.com> - 2016-04-12 17:10 +0200
[PATCH 2/3] rxrpc: The RXRPC_ACCEPT control message should not have an address David Howells <dhowells@redhat.com> - 2016-04-12 17:10 +0200
[PATCH 1/3] rxrpc: Don't permit use of connect() op and simplify sendmsg() op David Howells <dhowells@redhat.com> - 2016-04-12 17:10 +0200
Re: [PATCH 1/3] rxrpc: Don't permit use of connect() op and simplify sendmsg() op David Miller <davem@davemloft.net> - 2016-04-15 03:10 +0200
Re: [PATCH 1/3] rxrpc: Don't permit use of connect() op and simplify sendmsg() op David Howells <dhowells@redhat.com> - 2016-04-15 05:30 +0200
csiph-web