Commit 1a4b8feb authored by Al Viro's avatar Al Viro

n_hdlc_tty_read(): remove pointless access_ok()

only copy_to_user() is done to the address in question
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 00fca6b5
...@@ -423,13 +423,6 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file, ...@@ -423,13 +423,6 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
struct n_hdlc_buf *rbuf; struct n_hdlc_buf *rbuf;
DECLARE_WAITQUEUE(wait, current); 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); add_wait_queue(&tty->read_wait, &wait);
for (;;) { for (;;) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment