diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2009-06-10 12:56:56 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-15 10:09:30 -0500 |
commit | df59c0ad05182329688e514e5a9c3836fa208ea3 (patch) | |
tree | bc46408a925f85eabccc979b84ac3dd7559cf0e7 /fs | |
parent | dc577d554a274b79a6ad05e9e1ac20c320200599 (diff) | |
download | blackbird-op-linux-df59c0ad05182329688e514e5a9c3836fa208ea3.tar.gz blackbird-op-linux-df59c0ad05182329688e514e5a9c3836fa208ea3.zip |
[SCSI] compat: don't perform unneeded copy in sg_io code
The members from 'status' in struct sg_io_hdr to the last are used to
transfer information from kernel to user space. The values that user
space sets are just ignored.
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index b83f6bcfa51a..905523cc281f 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -788,12 +788,6 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) if (put_user(compat_ptr(data), &sgio->usr_ptr)) return -EFAULT; - if (copy_in_user(&sgio->status, &sgio32->status, - (4 * sizeof(unsigned char)) + - (2 * sizeof(unsigned short)) + - (3 * sizeof(int)))) - return -EFAULT; - err = sys_ioctl(fd, cmd, (unsigned long) sgio); if (err >= 0) { |