VMCIQueuePair_Alloc will allow a local queue pair to be
allocated with a non-local peer ID. Instead, it should return
VMCI_ERROR_NO_ACCESS. This change fixes that.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
return VMCI_ERROR_NO_ACCESS;
}
+ /*
+ * Creator's context ID for local queue pairs should match the
+ * peer, if a peer is specified.
+ */
+
+ if (isLocal && peer != VMCI_INVALID_ID && contextId != peer) {
+ return VMCI_ERROR_NO_ACCESS;
+ }
+
entry = VMCI_AllocKernelMem(sizeof *entry, VMCI_MEMORY_ATOMIC);
if (!entry) {
return VMCI_ERROR_NO_MEM;
#ifndef _VMCI_VERSION_H_
#define _VMCI_VERSION_H_
-#define VMCI_DRIVER_VERSION 9.3.9.0
-#define VMCI_DRIVER_VERSION_COMMAS 9,3,9,0
-#define VMCI_DRIVER_VERSION_STRING "9.3.9.0"
+#define VMCI_DRIVER_VERSION 9.3.10.0
+#define VMCI_DRIVER_VERSION_COMMAS 9,3,10,0
+#define VMCI_DRIVER_VERSION_STRING "9.3.10.0"
#endif /* _VMCI_VERSION_H_ */