]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix VMCIQueuePair_Alloc error on non-local peer for local QPs
authorVMware, Inc <>
Mon, 26 Sep 2011 19:48:01 +0000 (12:48 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 26 Sep 2011 19:48:01 +0000 (12:48 -0700)
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>
open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c
open-vm-tools/modules/linux/vmci/linux/vmci_version.h

index 5678b3c99451303c87872b124d22fafe9f7026dc..d49ea89e7d98b1d6a01c600aaa01c77fe6c36304 100644 (file)
@@ -1020,6 +1020,15 @@ VMCIQPBrokerCreate(VMCIHandle handle,             // IN
       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;
index 5dd62502931e9f7602d762624aecefccfd33a9eb..5f95b4229489939139173826861ac83e454388e1 100644 (file)
@@ -25,8 +25,8 @@
 #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_ */