From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Petr Vandrovec <petr@vandrovec.name>
Cc: dan@dennedy.org, linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel
Date: Wed, 16 May 2007 01:00:35 +0200 (CEST) [thread overview]
Message-ID: <tkrat.0e3c053d4bae6087@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.a2f16b56bae46a1e@s5r6.in-berlin.de>
Date: Mon, 7 May 2007 04:14:47 +0200
From: Petr Vandrovec <petr@vandrovec.name>
read() always failed with -EFAULT. This was happening due to
raw1394_compat_read copying data to wrong location - access_ok always
failed as 'r' is kernel address, not user. Whole function just tried to
copy data from 'r' to 'r', which is not good.
Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
---
drivers/ieee1394/raw1394.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.22-rc1/drivers/ieee1394/raw1394.c
===================================================================
--- linux-2.6.22-rc1.orig/drivers/ieee1394/raw1394.c
+++ linux-2.6.22-rc1/drivers/ieee1394/raw1394.c
@@ -459,7 +459,7 @@ static const char __user *raw1394_compat
static int
raw1394_compat_read(const char __user *buf, struct raw1394_request *r)
{
- struct compat_raw1394_req __user *cr = (typeof(cr)) r;
+ struct compat_raw1394_req __user *cr = (typeof(cr)) buf;
if (!access_ok(VERIFY_WRITE, cr, sizeof(struct compat_raw1394_req)) ||
P(type) ||
P(error) ||
--
Stefan Richter
-=====-=-=== -=-= =----
http://arcgraph.de/sr/
next prev parent reply other threads:[~2007-05-15 23:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-07 2:14 [PATCH] Fix/add raw1394 CONFIG_COMPAT code Petr Vandrovec
2007-05-07 16:40 ` Stefan Richter
2007-05-15 3:52 ` Dan Dennedy
2007-05-15 22:59 ` Stefan Richter
2007-05-15 23:00 ` Stefan Richter [this message]
2007-05-15 23:01 ` [PATCH 2/3] ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel Stefan Richter
2007-05-15 23:02 ` [PATCH 3/3] ieee1394: raw1394: Add ioctl() " Stefan Richter
2007-05-15 23:51 ` [PATCH] Fix/add raw1394 CONFIG_COMPAT code Petr Vandrovec
2007-05-19 23:55 ` Arnd Bergmann
2007-05-20 0:02 ` Stefan Richter
2007-05-20 15:03 ` Arnd Bergmann
2007-05-20 15:28 ` Stefan Richter
2007-05-20 15:37 ` Arnd Bergmann
2007-05-20 15:55 ` Stefan Richter
2007-05-21 7:28 ` Stefan Richter
2007-05-21 16:52 ` [PATCH] ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment Stefan Richter
2007-05-23 4:54 ` [PATCH] Fix/add raw1394 CONFIG_COMPAT code Dan Dennedy
2007-05-23 6:32 ` Stefan Richter
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=tkrat.0e3c053d4bae6087@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=dan@dennedy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=petr@vandrovec.name \
/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
all inboxes | Powered by JetHome®