RxRPC: fix rxrpc_recvmsg()'s returning of msg_name
Subsystems (3)
PATCH 2/2 RxRPC: fix rxrpc_recvmsg()'s returning of msg_name
From: David Howells <[email protected]>
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 <[email protected]>
Cc "David S. Miller" <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
net/rxrpc/ar-recvmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/rxrpc/ar-recvmsg.c renamed from net/rxrpc/ar-recvmsg.c~rxrpc-fix-rxrpc_recvmsgs-returning-of-msg_name +2 -1
@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, st/* 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); }
_
From: [email protected]
Date: Tue, 04 Mar 2008 14:56:49 -0800
Quoted 6 lines
Fix
rxrpc_recvmsg()to returnmsg_namecorrectly. We shouldn't overwrite the *msg struct, but should rather write intomsg->msg_name(there's a '&' unary operator that shouldn't be there).Signed-off-by David Howells <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied.