From: akpm@linux-foundation.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org, dhowells@redhat.com
Subject: [patch (for 2.6.25?) 2/2] RxRPC: fix rxrpc_recvmsg()'s returning of msg_name
Date: Tue, 04 Mar 2008 14:56:49 -0800 [thread overview]
Message-ID: <200803042256.m24Muogl001357@imap1.linux-foundation.org> (raw)
From: David Howells <dhowells@redhat.com>
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>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/rxrpc/ar-recvmsg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN net/rxrpc/ar-recvmsg.c~rxrpc-fix-rxrpc_recvmsgs-returning-of-msg_name net/rxrpc/ar-recvmsg.c
--- a/net/rxrpc/ar-recvmsg.c~rxrpc-fix-rxrpc_recvmsgs-returning-of-msg_name
+++ a/net/rxrpc/ar-recvmsg.c
@@ -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);
}
_
next reply other threads:[~2008-03-04 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 22:56 akpm [this message]
2008-03-06 2:54 ` [patch (for 2.6.25?) 2/2] RxRPC: fix rxrpc_recvmsg()'s returning of msg_name David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803042256.m24Muogl001357@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).