From: David Howells <dhowells@redhat•com>
To: David Miller <davem@davemloft•net>, dan.carpenter@oracle•com
Cc: dhowells@redhat•com, netdev@vger•kernel.org,
kernel-janitors@vger•kernel.org
Subject: Re: [patch] RxRPC: use copy_to_user() instead of memcpy()
Date: Tue, 19 Mar 2013 13:59:30 +0000 [thread overview]
Message-ID: <30707.1363701570@warthog.procyon.org.uk> (raw)
In-Reply-To: <20130319.094240.1315516663563952557.davem@davemloft.net>
David Miller <davem@davemloft•net> wrote:
> > /* 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,
> > - sizeof(call->conn->trans->peer->srx));
>
> I bet the size is too large for a sockaddr_storage, and therefore we
> spam the kernel stack. So I can only guess that changing this to a
> copy_to_user() fixes the hang because it simply faults on the kernel
> destination address.
Maybe, though I don't see how that would just fix the hang rather than
oopsing. If Dan can printk the following:
msg->msg_namelen
sizeof(call->conn->trans->peer->srx)
before doing the memcpy, that could be handy.
David
next prev parent reply other threads:[~2013-03-19 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 10:55 [patch] RxRPC: use copy_to_user() instead of memcpy() Dan Carpenter
2013-03-19 13:42 ` David Miller
2013-03-19 13:59 ` David Howells [this message]
2013-03-19 22:51 ` Dan Carpenter
2013-03-20 10:23 ` David Howells
2013-03-20 15:52 ` Dan Carpenter
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=30707.1363701570@warthog.procyon.org.uk \
--to=dhowells@redhat$(echo .)com \
--cc=dan.carpenter@oracle$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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