From: Al Viro Date: Fri, 8 May 2020 03:28:15 +0000 (-0400) Subject: vmci_host: get rid of pointless access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=87c233b8158a20a9c9ab1da96cb5cb1734d9006e;p=linux.git vmci_host: get rid of pointless access_ok() 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 Signed-off-by: Al Viro --- diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c index ce16d6b99295e..2d8328d928d53 100644 --- a/drivers/misc/vmw_vmci/vmci_host.c +++ b/drivers/misc/vmw_vmci/vmci_host.c @@ -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.