From df59c0ad05182329688e514e5a9c3836fa208ea3 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Wed, 10 Jun 2009 12:56:56 -0700 Subject: [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 Acked-by: Jens Axboe Acked-by: FUJITA Tomonori Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- fs/compat_ioctl.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'fs') 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) { -- cgit v1.2.3-59-g8ed1b