Skip to content

Commit

Permalink
RxRPC: fix rxrpc_recvmsg()'s returning of msg_name
Browse files Browse the repository at this point in the history
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: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Howells authored and David S. Miller committed Mar 6, 2008
1 parent 02ff05c commit 1ff82fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/rxrpc/ar-recvmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
/* copy the peer address and timestamp */
if (!continue_call) {
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));
sock_recv_timestamp(msg, &rx->sk, skb);
}
Expand Down

0 comments on commit 1ff82fe

Please sign in to comment.