n_hdlc_tty_read(): remove pointless access_ok()

only copy_to_user() is done to the address in question

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2020-02-18 12:42:57 -05:00
parent 00fca6b53a
commit 1a4b8febb6

View File

@ -423,13 +423,6 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
struct n_hdlc_buf *rbuf;
DECLARE_WAITQUEUE(wait, current);
/* verify user access to buffer */
if (!access_ok(buf, nr)) {
pr_warn("%s(%d) %s() can't verify user buffer\n",
__FILE__, __LINE__, __func__);
return -EFAULT;
}
add_wait_queue(&tty->read_wait, &wait);
for (;;) {