diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 10:54:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 10:54:25 -0700 |
commit | 57ee3196ce7c7cbc52f2792414919d9756b42828 (patch) | |
tree | 519f0e4248ba7e4691bb7011b047909b37b1960c | |
parent | 73ba2fb33c492916853dfe63e3b3163da0be661d (diff) | |
parent | f075dce66c6039bb97b762b592a6db6d79e4350a (diff) | |
download | linux-57ee3196ce7c7cbc52f2792414919d9756b42828.tar.bz2 |
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
-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); |