From: Al Viro Date: Thu, 23 Apr 2020 01:52:17 +0000 (-0400) Subject: nvram: drop useless access_ok() X-Git-Tag: v5.8-rc1~209^2~13 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=558cc8f7822ba25711142f5e7718be857b286793;p=users%2Fjedix%2Flinux-maple.git nvram: drop useless access_ok() we are using copy_to_user()/memdup_user() anyway Reviewed-by: Greg Kroah-Hartman Signed-off-by: Al Viro --- diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 4667844eee69..8206412d25ba 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -232,8 +232,6 @@ static ssize_t nvram_misc_read(struct file *file, char __user *buf, ssize_t ret; - if (!access_ok(buf, count)) - return -EFAULT; if (*ppos >= nvram_size) return 0; @@ -264,8 +262,6 @@ static ssize_t nvram_misc_write(struct file *file, const char __user *buf, char *tmp; ssize_t ret; - if (!access_ok(buf, count)) - return -EFAULT; if (*ppos >= nvram_size) return 0;