diff options
| -rw-r--r-- | drivers/misc/vmw_vmci/vmci_doorbell.c | 8 | ||||
| -rw-r--r-- | drivers/misc/vmw_vmci/vmci_driver.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_doorbell.c b/drivers/misc/vmw_vmci/vmci_doorbell.c index a8cee33ae8d2..b3fa738ae005 100644 --- a/drivers/misc/vmw_vmci/vmci_doorbell.c +++ b/drivers/misc/vmw_vmci/vmci_doorbell.c | |||
| @@ -431,6 +431,12 @@ int vmci_doorbell_create(struct vmci_handle *handle, | |||
| 431 | if (vmci_handle_is_invalid(*handle)) { | 431 | if (vmci_handle_is_invalid(*handle)) { |
| 432 | u32 context_id = vmci_get_context_id(); | 432 | u32 context_id = vmci_get_context_id(); |
| 433 | 433 | ||
| 434 | if (context_id == VMCI_INVALID_ID) { | ||
| 435 | pr_warn("Failed to get context ID\n"); | ||
| 436 | result = VMCI_ERROR_NO_RESOURCES; | ||
| 437 | goto free_mem; | ||
| 438 | } | ||
| 439 | |||
| 434 | /* Let resource code allocate a free ID for us */ | 440 | /* Let resource code allocate a free ID for us */ |
| 435 | new_handle = vmci_make_handle(context_id, VMCI_INVALID_ID); | 441 | new_handle = vmci_make_handle(context_id, VMCI_INVALID_ID); |
| 436 | } else { | 442 | } else { |
| @@ -525,7 +531,7 @@ int vmci_doorbell_destroy(struct vmci_handle handle) | |||
| 525 | 531 | ||
| 526 | entry = container_of(resource, struct dbell_entry, resource); | 532 | entry = container_of(resource, struct dbell_entry, resource); |
| 527 | 533 | ||
| 528 | if (vmci_guest_code_active()) { | 534 | if (!hlist_unhashed(&entry->node)) { |
| 529 | int result; | 535 | int result; |
| 530 | 536 | ||
| 531 | dbell_index_table_remove(entry); | 537 | dbell_index_table_remove(entry); |
diff --git a/drivers/misc/vmw_vmci/vmci_driver.c b/drivers/misc/vmw_vmci/vmci_driver.c index 896be150e28f..d7eaf1eb11e7 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 | ||
| 114 | MODULE_AUTHOR("VMware, Inc."); | 114 | MODULE_AUTHOR("VMware, Inc."); |
| 115 | MODULE_DESCRIPTION("VMware Virtual Machine Communication Interface."); | 115 | MODULE_DESCRIPTION("VMware Virtual Machine Communication Interface."); |
| 116 | MODULE_VERSION("1.1.4.0-k"); | 116 | MODULE_VERSION("1.1.5.0-k"); |
| 117 | MODULE_LICENSE("GPL v2"); | 117 | MODULE_LICENSE("GPL v2"); |
