From: Jeffrey Altman Date: Wed, 6 Jul 2011 22:19:31 +0000 (-0400) Subject: Windows: Do not probe new servers from cm_UpdateVolumeLocation X-Git-Tag: upstream/1.8.0_pre1^2~3578 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1a56229910a67cc782959beb45f56d244d6b3c4f;p=packages%2Fo%2Fopenafs.git Windows: Do not probe new servers from cm_UpdateVolumeLocation cm_NewServer() can result in a call to cm_UpdateVolumeLocation() if a server probe is performed. In order to avoid recursive calls to cm_UpdateVolumeLocation() do not probe new servers from within cm_UpdateVolumeLocation(). Change-Id: Icdb8efe030ae3e1f714ca72ad741bd38c692697f Reviewed-on: http://gerrit.openafs.org/4922 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 5620895be..6e92b3300 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -547,10 +547,12 @@ long cm_UpdateVolumeLocation(struct cm_cell *cellp, cm_user_t *userp, cm_req_t * if (!tsp) { /* * cm_NewServer will probe the file server which in turn will - * update the state on the volume group object + * update the state on the volume group object. Do not probe + * in this thread. It will block the thread and can result in + * a recursive call to cm_UpdateVolumeLocation(). */ lock_ReleaseWrite(&volp->rw); - tsp = cm_NewServer(&tsockAddr, CM_SERVER_FILE, cellp, &serverUUID[i], 0); + tsp = cm_NewServer(&tsockAddr, CM_SERVER_FILE, cellp, &serverUUID[i], CM_FLAG_NOPROBE); lock_ObtainWrite(&volp->rw); } osi_assertx(tsp != NULL, "null cm_server_t");