Commit 1ff82fe0 authored by David Howells's avatar David Howells Committed by David S. Miller

RxRPC: fix rxrpc_recvmsg()'s returning of msg_name

Fix rxrpc_recvmsg() to return msg_name correctly.  We shouldn't
overwrite the *msg struct, but should rather write into msg->msg_name
(there's a '&' unary operator that shouldn't be there).
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 02ff05c4
...@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, ...@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
/* copy the peer address and timestamp */ /* copy the peer address and timestamp */
if (!continue_call) { if (!continue_call) {
if (msg->msg_name && msg->msg_namelen > 0) if (msg->msg_name && msg->msg_namelen > 0)
memcpy(&msg->msg_name, &call->conn->trans->peer->srx, memcpy(msg->msg_name,
&call->conn->trans->peer->srx,
sizeof(call->conn->trans->peer->srx)); sizeof(call->conn->trans->peer->srx));
sock_recv_timestamp(msg, &rx->sk, skb); sock_recv_timestamp(msg, &rx->sk, skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment