aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/vmw_vmci/vmci_driver.c2
-rw-r--r--drivers/misc/vmw_vmci/vmci_host.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_driver.c b/drivers/misc/vmw_vmci/vmci_driver.c
index 3dee7ae123e7..032d35cf93ca 100644
--- a/drivers/misc/vmw_vmci/vmci_driver.c
+++ b/drivers/misc/vmw_vmci/vmci_driver.c
@@ -113,5 +113,5 @@ module_exit(vmci_drv_exit);
113 113
114MODULE_AUTHOR("VMware, Inc."); 114MODULE_AUTHOR("VMware, Inc.");
115MODULE_DESCRIPTION("VMware Virtual Machine Communication Interface."); 115MODULE_DESCRIPTION("VMware Virtual Machine Communication Interface.");
116MODULE_VERSION("1.1.0.0-k"); 116MODULE_VERSION("1.1.1.0-k");
117MODULE_LICENSE("GPL v2"); 117MODULE_LICENSE("GPL v2");
diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index 1723a6e4f2e8..66fc9921fc85 100644
--- a/drivers/misc/vmw_vmci/vmci_host.c
+++ b/drivers/misc/vmw_vmci/vmci_host.c
@@ -218,13 +218,12 @@ static int drv_cp_harray_to_user(void __user *user_buf_uva,
218} 218}
219 219
220/* 220/*
221 * Sets up a given context for notify to work. Calls drv_map_bool_ptr() 221 * Sets up a given context for notify to work. Maps the notify
222 * which maps the notify boolean in user VA in kernel space. 222 * boolean in user VA into kernel space.
223 */ 223 */
224static int vmci_host_setup_notify(struct vmci_ctx *context, 224static int vmci_host_setup_notify(struct vmci_ctx *context,
225 unsigned long uva) 225 unsigned long uva)
226{ 226{
227 struct page *page;
228 int retval; 227 int retval;
229 228
230 if (context->notify_page) { 229 if (context->notify_page) {
@@ -243,14 +242,16 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
243 /* 242 /*
244 * Lock physical page backing a given user VA. 243 * Lock physical page backing a given user VA.
245 */ 244 */
246 retval = get_user_pages_fast(PAGE_ALIGN(uva), 1, 1, &page); 245 retval = get_user_pages_fast(uva, 1, 1, &context->notify_page);
247 if (retval != 1) 246 if (retval != 1) {
247 context->notify_page = NULL;
248 return VMCI_ERROR_GENERIC; 248 return VMCI_ERROR_GENERIC;
249 }
249 250
250 /* 251 /*
251 * Map the locked page and set up notify pointer. 252 * Map the locked page and set up notify pointer.
252 */ 253 */
253 context->notify = kmap(page) + (uva & (PAGE_SIZE - 1)); 254 context->notify = kmap(context->notify_page) + (uva & (PAGE_SIZE - 1));
254 vmci_ctx_check_signal_notify(context); 255 vmci_ctx_check_signal_notify(context);
255 256
256 return VMCI_SUCCESS; 257 return VMCI_SUCCESS;