From: Al Viro Date: Thu, 23 Apr 2020 03:08:34 +0000 (-0400) Subject: via-pmu: don't bother with access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d65aca9ff83b04fa1062800c7796d44729ef55af;p=linux.git via-pmu: don't bother with access_ok() we are using copy_to_user() for actual copying Signed-off-by: Al Viro --- diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 83eb05bf85ff9..8450d7c008d0f 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -2184,8 +2184,6 @@ pmu_read(struct file *file, char __user *buf, if (count < 1 || !pp) return -EINVAL; - if (!access_ok(buf, count)) - return -EFAULT; spin_lock_irqsave(&pp->lock, flags); add_wait_queue(&pp->wait, &wait);