From: VMware, Inc <> Date: Thu, 2 Aug 2012 06:50:55 +0000 (-0700) Subject: vSock: only print warning if we could not register address family at all X-Git-Tag: 2012.10.14-874563~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7dfb1faba612bba10a093687ef0f90bd66d2fe7b;p=thirdparty%2Fopen-vm-tools.git vSock: only print warning if we could not register address family at all 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 --- diff --git a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c index 1032e3e1e..49e90ada0 100644 --- a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c +++ b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c @@ -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; } diff --git a/open-vm-tools/modules/linux/vsock/linux/vsock_version.h b/open-vm-tools/modules/linux/vsock/linux/vsock_version.h index d89fb89e0..45f2d8e98 100644 --- a/open-vm-tools/modules/linux/vsock/linux/vsock_version.h +++ b/open-vm-tools/modules/linux/vsock/linux/vsock_version.h @@ -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_ */