diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-04-23 04:52:17 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-05-29 18:03:30 +0300 |
commit | 558cc8f7822ba25711142f5e7718be857b286793 (patch) | |
tree | a8ed64e09ca72fc5f594b0be023c48f6fc566aef /drivers/char | |
parent | 1a4b8febb6c13766f1af91058b90fee876e11674 (diff) | |
download | linux-558cc8f7822ba25711142f5e7718be857b286793.tar.xz |
nvram: drop useless access_ok()
we are using copy_to_user()/memdup_user() anyway
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/nvram.c | 4 |
1 files changed, 0 insertions, 4 deletions
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; |