]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
vSock: only print warning if we could not register address family at all
authorVMware, Inc <>
Thu, 2 Aug 2012 06:50:55 +0000 (23:50 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Thu, 2 Aug 2012 18:23:08 +0000 (11:23 -0700)
vSockets on Linux tries to claim an address family starting from the top
of the valid range.  If someone has already claimed an address, we will
print a warning to the kernel log and then continue looping.  This
warning started appearing on Cent OS 5.4 in autoinstall tests, presumably
because someone is grabbing the top family.  Because the automation is
screenshot-based, the presence of the warning is causing the test to fail.
Fixed by moving the warning to the very end.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/modules/linux/vsock/linux/af_vsock.c
open-vm-tools/modules/linux/vsock/linux/vsock_version.h

index 1032e3e1e33112395b0e945d53e1eaf9b3ab0e4a..49e90ada0197f7405cc9ecdc5c615cd51c876000 100644 (file)
@@ -3449,7 +3449,6 @@ VSockVmciRegisterAddressFamily(void)
       vsockVmciFamilyOps.family = i;
       err = sock_register(&vsockVmciFamilyOps);
       if (err) {
-         Warning("Could not register address family %d.\n", i);
          vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY;
       } else {
          vsockVmciDgramOps.family = i;
@@ -3460,6 +3459,10 @@ VSockVmciRegisterAddressFamily(void)
       }
    }
 
+   if (VSOCK_INVALID_FAMILY == vsockVmciFamilyOps.family) {
+      Warning("Could not register address family.\n");
+   }
+
    return err;
 }
 
index d89fb89e08079687125c1ad8b79edb9b3b2b1d3c..45f2d8e985db76f66e602d03074036359b5531c2 100644 (file)
@@ -25,8 +25,8 @@
 #ifndef _VSOCK_VERSION_H_
 #define _VSOCK_VERSION_H_
 
-#define VSOCK_DRIVER_VERSION          9.5.3.0
-#define VSOCK_DRIVER_VERSION_COMMAS   9,5.3,0
-#define VSOCK_DRIVER_VERSION_STRING   "9.5.3.0"
+#define VSOCK_DRIVER_VERSION          9.5.4.0
+#define VSOCK_DRIVER_VERSION_COMMAS   9,5.4,0
+#define VSOCK_DRIVER_VERSION_STRING   "9.5.4.0"
 
 #endif /* _VSOCK_VERSION_H_ */