[4/4] vmci_host: get rid of pointless access_ok()
diff mbox series

Message ID 20200509234557.1124086-20-viro@ZenIV.linux.org.uk
State New
Headers show
Series
  • [01/20] dlmfs_file_write(): get rid of pointless access_ok()
Related show

Commit Message

Al Viro May 9, 2020, 11:45 p.m. UTC
From: Al Viro <viro@zeniv.linux.org.uk>

get_user_pages_fast() doesn't need the caller to check that.
NB: reachable only from ioctl(2) and only under USER_DS

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/misc/vmw_vmci/vmci_host.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Greg Kroah-Hartman May 15, 2020, 10:53 a.m. UTC | #1
On Sun, May 10, 2020 at 12:45:57AM +0100, Al Viro wrote:
> From: Al Viro <viro@zeniv.linux.org.uk>
> 
> get_user_pages_fast() doesn't need the caller to check that.
> NB: reachable only from ioctl(2) and only under USER_DS
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>  drivers/misc/vmw_vmci/vmci_host.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Patch
diff mbox series

diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index ce16d6b99295..2d8328d928d5 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.