From: Al Viro Date: Thu, 23 Apr 2020 14:19:04 +0000 (-0400) Subject: batadv_socket_read(): get rid of pointless access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=38c53ca3c114fa2a7030f0d1f54feaf044957609;p=linux.git batadv_socket_read(): get rid of pointless access_ok() address is passed only to copy_to_user() Signed-off-by: Al Viro --- diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index ccb535c77e5da..8bdabc03b0b23 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c @@ -135,9 +135,6 @@ static ssize_t batadv_socket_read(struct file *file, char __user *buf, if (!buf || count < sizeof(struct batadv_icmp_packet)) return -EINVAL; - if (!access_ok(buf, count)) - return -EFAULT; - error = wait_event_interruptible(socket_client->queue_wait, socket_client->queue_len);