diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-10-17 21:39:25 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-11-06 06:04:03 +0100 |
commit | 1feefb7ec2fe11d666f6bdca6daa7affbf9c6ce9 (patch) | |
tree | 617035c40c10923e6e062f6a07a90331399f5bb3 /drivers/scsi/sg.c | |
parent | scsi: sg: sg_write(): get rid of access_ok()/__copy_from_user()/__get_user() (diff) | |
download | linux-1feefb7ec2fe11d666f6bdca6daa7affbf9c6ce9.tar.xz linux-1feefb7ec2fe11d666f6bdca6daa7affbf9c6ce9.zip |
scsi: sg: sg_ioctl(): get rid of access_ok()
simply not needed there - neither sg_new_read() nor sg_new_write() need
it.
Link: https://lore.kernel.org/r/20191017193925.25539-8-viro@ZenIV.linux.org.uk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index f3d090b93cdf..0940abd91d3c 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -896,8 +896,6 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) return -ENODEV; if (!scsi_block_when_processing_errors(sdp->device)) return -ENXIO; - if (!access_ok(p, SZ_SG_IO_HDR)) - return -EFAULT; result = sg_new_write(sfp, filp, p, SZ_SG_IO_HDR, 1, read_only, 1, &srp); if (result < 0) |