Commit 341da4ab authored by Mike Miller's avatar Mike Miller Committed by Linus Torvalds

[PATCH] cciss: fixes to 32/64-bit conversions

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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f2e335fa
...@@ -578,7 +578,7 @@ int cciss_ioctl32_passthru(unsigned int fd, unsigned cmd, unsigned long arg, ...@@ -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); err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) p);
if (err) if (err)
return 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) if (err)
return -EFAULT; return -EFAULT;
return err; return err;
...@@ -610,7 +610,7 @@ int cciss_ioctl32_big_passthru(unsigned int fd, unsigned cmd, unsigned long arg, ...@@ -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); err = sys_ioctl(fd, CCISS_BIG_PASSTHRU, (unsigned long) p);
if (err) if (err)
return 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) if (err)
return -EFAULT; return -EFAULT;
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment