[NTOSKRNL]

Patch by Thomas Faber
ExAcquireSharedStarveExclusive and ExAcquireSharedWaitForExclusive should
return FALSE when they cannot immediately acquire the resource, and the Wait parameter is false. They return TRUE instead, leading the caller to believe it acquired the resource, which will result in a bugcheck when it tries to release it.

See issue #6375 for more details.

svn path=/trunk/; revision=52741
This commit is contained in:
Timo Kreuzer 2011-07-20 16:29:38 +00:00
parent 723d09b46c
commit ffe1655d1a

View file

@ -1159,7 +1159,7 @@ TryAcquire:
{
/* Release the lock and return */
ExReleaseResourceLock(Resource, &LockHandle);
return TRUE;
return FALSE;
}
/* Check if we have a shared waiters semaphore */
@ -1276,7 +1276,7 @@ TryAcquire:
{
/* So bail out if we're not allowed */
ExReleaseResourceLock(Resource, &LockHandle);
return TRUE;
return FALSE;
}
/* Check if we have a shared waiters semaphore */
@ -1359,7 +1359,7 @@ TryAcquire:
{
/* So bail out if we're not allowed */
ExReleaseResourceLock(Resource, &LockHandle);
return TRUE;
return FALSE;
}
/* Check if we have a shared waiters semaphore */