]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
VMCI: report VMCI_ERROR_DST_UNREACHABLE when VMX goes away
authorVMware, Inc <>
Tue, 13 Mar 2012 20:03:30 +0000 (13:03 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Wed, 14 Mar 2012 16:04:58 +0000 (09:04 -0700)
When a VMCI driver with host side only attempts to route to an
unknown context ID, it reports
VMCI_ERROR_DEVICE_NOT_FOUND. Change that to
VMCI_ERROR_DST_UNREACHABLE, since that is more descriptive.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/modules/linux/vmci/common/vmciRoute.c
open-vm-tools/modules/linux/vmci/linux/vmci_version.h

index 2905a8127b2e0cc1ff1a0e5d09a9721aee3fa88e..1ca425638ae0b3a96de6d06b10d8bcdc4bb51f85 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2011 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2012 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -214,6 +214,13 @@ VMCI_Route(VMCIHandle *src,       // IN/OUT
          /* Pass it up to the guest. */
          *route = VMCI_ROUTE_AS_HOST;
          return VMCI_SUCCESS;
+      } else if (!hasGuestDevice) {
+         /*
+          * The host is attempting to reach a CID without an active context, and
+          * we can't send it down, since we have no guest device.
+          */
+
+         return VMCI_ERROR_DST_UNREACHABLE;
       }
    }
 
@@ -225,6 +232,14 @@ VMCI_Route(VMCIHandle *src,       // IN/OUT
     */
 
    if (!hasGuestDevice) {
+      /*
+       * Ending up here means we have neither guest nor host device. That
+       * shouldn't happen, since any VMCI client in the kernel should have done
+       * a successful VMCI_DeviceGet.
+       */
+
+      ASSERT(FALSE);
+
       return VMCI_ERROR_DEVICE_NOT_FOUND;
    }
 
index 9e51d2ca357ab04ea439856016019aa55d6f9f5c..26c90eef2e29fb422a5714762fbf1dcbce1f80cb 100644 (file)
@@ -25,8 +25,8 @@
 #ifndef _VMCI_VERSION_H_
 #define _VMCI_VERSION_H_
 
-#define VMCI_DRIVER_VERSION          9.4.0.0
-#define VMCI_DRIVER_VERSION_COMMAS   9,4,0,0
-#define VMCI_DRIVER_VERSION_STRING   "9.4.0.0"
+#define VMCI_DRIVER_VERSION          9.4.1.0
+#define VMCI_DRIVER_VERSION_COMMAS   9,4,1,0
+#define VMCI_DRIVER_VERSION_STRING   "9.4.1.0"
 
 #endif /* _VMCI_VERSION_H_ */