batadv_socket_read(): get rid of pointless access_ok()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Apr 2020 14:19:04 +0000 (10:19 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 May 2020 00:31:33 +0000 (20:31 -0400)
address is passed only to copy_to_user()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
net/batman-adv/icmp_socket.c

index ccb535c..8bdabc0 100644 (file)
@@ -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);