From: Al Viro Date: Sun, 4 Jun 2017 01:50:46 +0000 (-0400) Subject: adb: get rid of pointless access_ok() X-Git-Tag: v4.14-rc1~594^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a5011936ec0ef22e9433cf2ee3520db4993b445;p=platform%2Fkernel%2Flinux-rpi.git adb: get rid of pointless access_ok() Signed-off-by: Al Viro --- diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index fee939ef..039dc82 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -723,8 +723,6 @@ static ssize_t adb_read(struct file *file, char __user *buf, return -EINVAL; if (count > sizeof(req->reply)) count = sizeof(req->reply); - if (!access_ok(VERIFY_WRITE, buf, count)) - return -EFAULT; req = NULL; spin_lock_irqsave(&state->lock, flags); @@ -781,8 +779,6 @@ static ssize_t adb_write(struct file *file, const char __user *buf, return -EINVAL; if (adb_controller == NULL) return -ENXIO; - if (!access_ok(VERIFY_READ, buf, count)) - return -EFAULT; req = kmalloc(sizeof(struct adb_request), GFP_KERNEL);