From 40090977d270f6113cca4925b9564f57c4917f35 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 11 Sep 2007 17:11:54 +0000 Subject: [PATCH] windows-getcell-deadlock-20070911 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 51bba40c86..8e64277deb 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -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 */