From ffe1655d1a202c371ac0b796b2032ca9c4119ff7 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 20 Jul 2011 16:29:38 +0000 Subject: [PATCH] [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 --- reactos/ntoskrnl/ex/resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index cf179ffca0c..1d33a45e322 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -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 */