summaryrefslogtreecommitdiff
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 10:54:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 10:54:25 -0700
commit57ee3196ce7c7cbc52f2792414919d9756b42828 (patch)
tree519f0e4248ba7e4691bb7011b047909b37b1960c /drivers/scsi/sg.c
parent73ba2fb33c492916853dfe63e3b3163da0be661d (diff)
parentf075dce66c6039bb97b762b592a6db6d79e4350a (diff)
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.c9
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);