mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
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:
parent
00fca6b53a
commit
1a4b8febb6
@ -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 (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user