diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 19:54:25 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 19:54:25 +0200 |
commit | 57ee3196ce7c7cbc52f2792414919d9756b42828 (patch) | |
tree | 519f0e4248ba7e4691bb7011b047909b37b1960c /drivers/scsi/sg.c | |
parent | Merge tag 'for-4.19/block-20180812' of git://git.kernel.dk/linux-block (diff) | |
parent | scsi sg: remove incorrect scsi command checking logic (diff) | |
download | linux-57ee3196ce7c7cbc52f2792414919d9756b42828.tar.xz linux-57ee3196ce7c7cbc52f2792414919d9756b42828.zip |
Merge SCSI_IOCTL_SEND_COMMAND cleanup branch.
Nobody commented on this patch back in July. So now it gets merged.
* SCSI_IOCTL_SEND_COMMAND cleanup:
scsi sg: remove incorrect scsi command checking logic
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index ba9ba0e04f42..139e13c73b41 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1103,15 +1103,6 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) case SCSI_IOCTL_SEND_COMMAND: if (atomic_read(&sdp->detaching)) return -ENODEV; - if (read_only) { - unsigned char opcode = WRITE_6; - Scsi_Ioctl_Command __user *siocp = p; - - if (copy_from_user(&opcode, siocp->data, 1)) - return -EFAULT; - if (sg_allow_access(filp, &opcode)) - return -EPERM; - } return sg_scsi_ioctl(sdp->device->request_queue, NULL, filp->f_mode, p); case SG_SET_DEBUG: result = get_user(val, ip); |