From: Al Viro Date: Thu, 23 Apr 2020 14:20:06 +0000 (-0400) Subject: tomoyo_write_control(): get rid of pointless access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=00fca6b53a88f600c59bae3828e1c2fdce58be0d;p=linux.git tomoyo_write_control(): get rid of pointless access_ok() address is passed only to get_user() Signed-off-by: Al Viro --- diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index 1b467381986f7..f93f8acd05f76 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -2662,8 +2662,6 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head, if (!head->write) return -EINVAL; - if (!access_ok(buffer, buffer_len)) - return -EFAULT; if (mutex_lock_interruptible(&head->io_sem)) return -EINTR; head->read_user_buf_avail = 0;