From: David Howells Date: Thu, 6 Mar 2008 02:53:55 +0000 (-0800) Subject: RxRPC: fix rxrpc_recvmsg()'s returning of msg_name X-Git-Tag: v2.6.25-rc6~31^2~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ff82fe0024e8070c38346b8abc1ff09612dea4c;p=linux-2.6 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: David Howells Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c index f19121d479..a39bf97f88 100644 --- a/net/rxrpc/ar-recvmsg.c +++ b/net/rxrpc/ar-recvmsg.c @@ -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); }