From ed1f92790747f2ddba51585257c73570754b669d Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 26 Jun 2008 08:26:48 +0000 Subject: [PATCH] Jeffrey Morlan - Fix a major problem in pushlock implementation: if there are 2 or more threads waiting for a lock, only one of them ever gets woken. ExfWakePushLock is missing a break in its loop so it removes all the WaitBlocks instead of just the last one. - This fixes all "weird" hangs happening, including FF1.5 installer hang, VMWare Video Driver Installer hang, taskmgr tabs hang, and other similar problems. See issue #3141 for more details. svn path=/trunk/; revision=34092 --- reactos/ntoskrnl/ex/pushlock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/ntoskrnl/ex/pushlock.c b/reactos/ntoskrnl/ex/pushlock.c index f392efc3f2e..07bd441d203 100644 --- a/reactos/ntoskrnl/ex/pushlock.c +++ b/reactos/ntoskrnl/ex/pushlock.c @@ -155,6 +155,9 @@ ExfWakePushLock(PEX_PUSH_LOCK PushLock, /* Remove waking bit from pushlock */ InterlockedAnd((PLONG)PushLock, ~EX_PUSH_LOCK_WAKING); + + /* Leave the loop */ + break; } }