Skip to content

Commit

Permalink
vmci_host: get rid of pointless access_ok()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed May 29, 2020
1 parent fd8ec4d commit 87c233b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/misc/vmw_vmci/vmci_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 87c233b

Please sign in to comment.