aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devices.c
diff options
context:
space:
mode:
authorAl Viro <[email protected]>2020-04-23 14:27:20 +0000
committerAl Viro <[email protected]>2020-05-29 15:05:58 +0000
commitfe6bb59f4dd693ffb678224fe78fc69dda163c46 (patch)
treee0dcc62270d8c2a0faa4679986203144caa48e15 /drivers/usb/core/devices.c
parentlpfc_debugfs: get rid of pointless access_ok() (diff)
downloadkernel-fe6bb59f4dd693ffb678224fe78fc69dda163c46.tar.gz
kernel-fe6bb59f4dd693ffb678224fe78fc69dda163c46.zip
usb: get rid of pointless access_ok() calls
in all affected cases addresses are passed only to copy_from()_user or copy_to_user(). Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'drivers/usb/core/devices.c')
-rw-r--r--drivers/usb/core/devices.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index 44f28a114c2b..94b6fa6e585e 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -598,8 +598,6 @@ static ssize_t usb_device_read(struct file *file, char __user *buf,
return -EINVAL;
if (nbytes <= 0)
return 0;
- if (!access_ok(buf, nbytes))
- return -EFAULT;
mutex_lock(&usb_bus_idr_lock);
/* print devices for all busses */