linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org, jgg@ziepe.ca,
	hubcap@omnibond.com, daniel.vetter@ffwll.ch,
	dvhart@infradead.org, sgarzare@redhat.com, tglx@linutronix.de,
	ira.weiny@intel.com
Cc: linux-kernel@vger.kernel.org, Souptick Joarder <jrdr.linux@gmail.com>
Subject: [PATCH] VMCI: Avoid extra check for access_ok()
Date: Wed,  6 May 2020 01:48:32 +0530	[thread overview]
Message-ID: <1588709912-8065-1-git-send-email-jrdr.linux@gmail.com> (raw)

get_user_pages_fast() is already having a check for the same. This
double check can be removed.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/misc/vmw_vmci/vmci_host.c | 2 --
 1 file changed, 2 deletions(-)

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


             reply	other threads:[~2020-05-05 20:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 20:18 Souptick Joarder [this message]
2020-06-24  1:41 ` [PATCH] VMCI: Avoid extra check for access_ok() Souptick Joarder
2020-06-24  9:10   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588709912-8065-1-git-send-email-jrdr.linux@gmail.com \
    --to=jrdr.linux@gmail.com \
    --cc=arnd@arndb.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dvhart@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hubcap@omnibond.com \
    --cc=ira.weiny@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).