summaryrefslogtreecommitdiff
path: root/drivers/misc/vmw_vmci/vmci_queue_pair.c
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-10-16 13:04:24 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2021-10-16 13:04:24 +0200
commitf8e718054f4421d11638e370b933ccc6c77466ed (patch)
tree973ff8cb8aed7d8e4da6a194456ddc01c206b7de /drivers/misc/vmw_vmci/vmci_queue_pair.c
parentd900385139e5aa8d584dee92c87bb85d0226253e (diff)
parent1392fe82d7fba00ba4a8e01968935f2b2085d5a4 (diff)
Merge tag 'v4.4.288' into toradex_vf_4.4
This is the 4.4.288 stable release Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'drivers/misc/vmw_vmci/vmci_queue_pair.c')
-rw-r--r--drivers/misc/vmw_vmci/vmci_queue_pair.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_queue_pair.c b/drivers/misc/vmw_vmci/vmci_queue_pair.c
index fcc4b4026834..11325bc70aef 100644
--- a/drivers/misc/vmw_vmci/vmci_queue_pair.c
+++ b/drivers/misc/vmw_vmci/vmci_queue_pair.c
@@ -2344,7 +2344,8 @@ int vmci_qp_broker_map(struct vmci_handle handle,
is_local = entry->qp.flags & VMCI_QPFLAG_LOCAL;
result = VMCI_SUCCESS;
- if (context_id != VMCI_HOST_CONTEXT_ID) {
+ if (context_id != VMCI_HOST_CONTEXT_ID &&
+ !QPBROKERSTATE_HAS_MEM(entry)) {
struct vmci_qp_page_store page_store;
page_store.pages = guest_mem;
@@ -2454,7 +2455,8 @@ int vmci_qp_broker_unmap(struct vmci_handle handle,
is_local = entry->qp.flags & VMCI_QPFLAG_LOCAL;
- if (context_id != VMCI_HOST_CONTEXT_ID) {
+ if (context_id != VMCI_HOST_CONTEXT_ID &&
+ QPBROKERSTATE_HAS_MEM(entry)) {
qp_acquire_queue_mutex(entry->produce_q);
result = qp_save_headers(entry);
if (result < VMCI_SUCCESS)