aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/vmw_vmci/vmci_host.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-10-02 16:27:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 18:04:55 -0700
commit240ddd495a9e72073d11b1b7c2ec9ea14e7015cb (patch)
tree68f1fe2c753dcfca69748bd7226da531654034ac /drivers/misc/vmw_vmci/vmci_host.c
parentmisc: mic: Enable OSPM suspend and resume support. (diff)
downloadlinux-dev-240ddd495a9e72073d11b1b7c2ec9ea14e7015cb.tar.xz
linux-dev-240ddd495a9e72073d11b1b7c2ec9ea14e7015cb.zip
vmw_vmci: Convert driver to use get_user_pages_fast()
Convert vmci_host_setup_notify() and qp_host_get_user_memory() to use get_user_pages_fast() instead of get_user_pages(). Note that qp_host_get_user_memory() was using mmap_sem for writing without an apparent reason. CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/vmw_vmci/vmci_host.c')
-rw-r--r--drivers/misc/vmw_vmci/vmci_host.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index d4722b3dc8ec..1723a6e4f2e8 100644
--- a/drivers/misc/vmw_vmci/vmci_host.c
+++ b/drivers/misc/vmw_vmci/vmci_host.c
@@ -243,11 +243,7 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
/*
* Lock physical page backing a given user VA.
*/
- down_read(&current->mm->mmap_sem);
- retval = get_user_pages(current, current->mm,
- PAGE_ALIGN(uva),
- 1, 1, 0, &page, NULL);
- up_read(&current->mm->mmap_sem);
+ retval = get_user_pages_fast(PAGE_ALIGN(uva), 1, 1, &page);
if (retval != 1)
return VMCI_ERROR_GENERIC;