]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] cciss: fixes to 32/64-bit conversions
authorMike Miller <mike.miller@hp.com>
Mon, 23 Aug 2004 06:07:21 +0000 (23:07 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:07:21 +0000 (23:07 -0700)
This patch fixes our usage of copy_to_user.  We were passing in the size of
the address rather than the size of the struct.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/cciss.c

index 5509e56208afa55dffbd973ad8e9c659baaac327..ed923aa3cc07861235db5f7f5bcd0e26e72181d9 100644 (file)
@@ -578,7 +578,7 @@ int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
        err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) p);
        if (err)
                return err;
-       err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
+       err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
        if (err)
                return -EFAULT;
        return err;
@@ -610,7 +610,7 @@ int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned long arg,
        err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) p);
        if (err)
                return err;
-       err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(&arg32->error_info));
+       err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info));
        if (err)
                return -EFAULT;
        return err;