OSDN Git Service

vmci_host: get rid of pointless access_ok()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 May 2020 03:28:15 +0000 (23:28 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 29 May 2020 15:06:38 +0000 (11:06 -0400)
get_user_pages_fast() doesn't need the caller to check that.
NB: reachable only from ioctl(2) and only under USER_DS

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/misc/vmw_vmci/vmci_host.c

index ce16d6b..2d8328d 100644 (file)
@@ -233,8 +233,6 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
         * about the size.
         */
        BUILD_BUG_ON(sizeof(bool) != sizeof(u8));
-       if (!access_ok((void __user *)uva, sizeof(u8)))
-               return VMCI_ERROR_GENERIC;
 
        /*
         * Lock physical page backing a given user VA.