aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-03-05 21:53:55 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 21:53:55 -0500
commit1ff82fe0024e8070c38346b8abc1ff09612dea4c (patch)
tree68f3eca9e9ce6d4ae4e38575ab1370fb3b911d76 /net/rxrpc
parent02ff05c49d7804f2574f358a937b43a41d15e36e (diff)
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 <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/ar-recvmsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c
index f19121d4795b..a39bf97f8830 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,
143 /* copy the peer address and timestamp */ 143 /* copy the peer address and timestamp */
144 if (!continue_call) { 144 if (!continue_call) {
145 if (msg->msg_name && msg->msg_namelen > 0) 145 if (msg->msg_name && msg->msg_namelen > 0)
146 memcpy(&msg->msg_name, &call->conn->trans->peer->srx, 146 memcpy(msg->msg_name,
147 &call->conn->trans->peer->srx,
147 sizeof(call->conn->trans->peer->srx)); 148 sizeof(call->conn->trans->peer->srx));
148 sock_recv_timestamp(msg, &rx->sk, skb); 149 sock_recv_timestamp(msg, &rx->sk, skb);
149 } 150 }