diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index 28b19ef26309..1f08f5a2f8fd 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c | |||
@@ -237,7 +237,7 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) | |||
237 | case SCSI_IOCTL_SEND_COMMAND: | 237 | case SCSI_IOCTL_SEND_COMMAND: |
238 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) | 238 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) |
239 | return -EACCES; | 239 | return -EACCES; |
240 | return sg_scsi_ioctl(NULL, sdev->request_queue, NULL, arg); | 240 | return sg_scsi_ioctl(sdev->request_queue, NULL, 0, arg); |
241 | case SCSI_IOCTL_DOORLOCK: | 241 | case SCSI_IOCTL_DOORLOCK: |
242 | return scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); | 242 | return scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); |
243 | case SCSI_IOCTL_DOORUNLOCK: | 243 | case SCSI_IOCTL_DOORUNLOCK: |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 93bd59a1ed79..9adf35bd8b56 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1059,7 +1059,7 @@ sg_ioctl(struct inode *inode, struct file *filp, | |||
1059 | if (sg_allow_access(filp, &opcode)) | 1059 | if (sg_allow_access(filp, &opcode)) |
1060 | return -EPERM; | 1060 | return -EPERM; |
1061 | } | 1061 | } |
1062 | return sg_scsi_ioctl(filp, sdp->device->request_queue, NULL, p); | 1062 | return sg_scsi_ioctl(sdp->device->request_queue, NULL, filp->f_mode, p); |
1063 | case SG_SET_DEBUG: | 1063 | case SG_SET_DEBUG: |
1064 | result = get_user(val, ip); | 1064 | result = get_user(val, ip); |
1065 | if (result) | 1065 | if (result) |