提交 691e0f2c 编写于 作者: S Souptick Joarder 提交者: Greg Kroah-Hartman

VMCI: Avoid extra check for access_ok()

get_user_pages_fast() is already having a check for the same. This
double check can be removed.
Signed-off-by: NSouptick Joarder <jrdr.linux@gmail.com>
Link: https://lore.kernel.org/r/1588709912-8065-1-git-send-email-jrdr.linux@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0548745f
...@@ -233,8 +233,6 @@ static int vmci_host_setup_notify(struct vmci_ctx *context, ...@@ -233,8 +233,6 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
* about the size. * about the size.
*/ */
BUILD_BUG_ON(sizeof(bool) != sizeof(u8)); 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. * Lock physical page backing a given user VA.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册