]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-getcell-deadlock-20070911
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 11 Sep 2007 17:11:54 +0000 (17:11 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 11 Sep 2007 17:11:54 +0000 (17:11 +0000)
don't hold the cm_scache_t mutex across calls to cm_GetCell() since
cm_GetCell() can block in an RPC call.  If that cm_scache_t must be
accessed to revoke a callback, it can result in a deadlock.

src/WINNT/afsd/cm_vnodeops.c

index 51bba40c865d4c19c1731cc1b85ca195e6819621..8e64277debc7737a9ad90b303bb85133e28870cb 100644 (file)
@@ -1074,7 +1074,9 @@ long cm_FollowMountPoint(cm_scache_t *scp, cm_scache_t *dscp, cm_user_t *userp,
         strncpy(cellNamep, mpNamep+1, cp - mpNamep - 1);
         strcpy(volNamep, cp+1);
         /* now look up the cell */
+        lock_ReleaseMutex(&scp->mx);
         cellp = cm_GetCell(cellNamep, CM_FLAG_CREATE);
+        lock_ObtainMutex(&scp->mx);
     }
     else {
         /* normal mt pt */