diff mbox series

[RFC,8/8] SG_IO: get rid of access_ok()

Message ID 20191017193925.25539-8-viro@ZenIV.linux.org.uk (mailing list archive)
State Mainlined
Commit 1feefb7ec2fe11d666f6bdca6daa7affbf9c6ce9
Headers show
Series [RFC,1/8] sg_ioctl(): fix copyout handling | expand

Commit Message

Al Viro Oct. 17, 2019, 7:39 p.m. UTC
From: Al Viro <viro@zeniv.linux.org.uk>

simply not needed there - neither sg_new_read() nor sg_new_write() need
it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/scsi/sg.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

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)