windows-aclent-deadlock-20050713

Discovered a deadlock due to a violation of lock order.  We may not
attempt to obtain a lock on a cm_scache_t mutex while holding the
cm_aclLock.
This commit is contained in:
Jeffrey Altman 2005-07-13 15:22:06 +00:00
parent 2d5bb80889
commit f21fa57453
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Since 1.3.85:
* Fixed a deadlock caused by the holder of cm_aclLock attempting to
obtain a mutex lock on a cm_scache_t object whose lock is held by
a thread attempting to obtain the cm_aclLock.
Since 1.3.84:
* Added a new registry key, "LogoffPreserveTokens" (see registry.txt),
that can be used to force the preservation of user tokens upon logout.

View File

@ -127,7 +127,9 @@ static cm_aclent_t *GetFreeACLEnt(cm_scache_t * scp)
if (aclp->backp && scp != aclp->backp) {
ascp = aclp->backp;
lock_ReleaseWrite(&cm_aclLock);
lock_ObtainMutex(&ascp->mx);
lock_ObtainWrite(&cm_aclLock);
}
CleanupACLEnt(aclp);