Commit:     ee9be425961c3ccf75553c83a73bf1f707e66d91
Parent:     6552731a058a4facefd921b0b45a9a5392baa5ea
Author:     Petr Vandrovec <[EMAIL PROTECTED]>
AuthorDate: Mon May 7 04:14:47 2007 +0200
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 00:07:37 2007 +0200

    ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel
    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 <[EMAIL PROTECTED]>
    Acked-by: Dan Dennedy <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]> (split into 3 patches)
 drivers/ieee1394/raw1394.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index f1d05ee..858fd9b 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -459,7 +459,7 @@ static const char __user *raw1394_compat_write(const char 
__user *buf)
 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) ||
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to