Author: cgutman
Date: Sat Jul 18 19:57:38 2009
New Revision: 42054
URL:
http://svn.reactos.org/svn/reactos?rev=42054&view=rev
Log:
- Don't change the lock's OldIrql value until we actually have the lock because
we need this value to unlock correctly
- This should fix bug 4704
Modified:
trunk/reactos/drivers/network/tcpip/recmutex/recmutex.c
Modified: trunk/reactos/drivers/network/tcpip/recmutex/recmutex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/recm…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/recmutex/recmutex.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/recmutex/recmutex.c [iso-8859-1] Sat Jul 18
19:57:38 2009
@@ -34,7 +34,6 @@
if( CurrentIrql <= APC_LEVEL ) {
ExAcquireFastMutex( &RecMutex->Mutex );
- RecMutex->OldIrql = CurrentIrql;
while( RecMutex->Locked ) {
ExReleaseFastMutex( &RecMutex->Mutex );
Status = KeWaitForSingleObject( &RecMutex->StateLockedEvent,
@@ -44,6 +43,7 @@
NULL );
ExAcquireFastMutex( &RecMutex->Mutex );
}
+ RecMutex->OldIrql = CurrentIrql;
RecMutex->Locked = TRUE;
RecMutex->Writer = ToWrite;
RecMutex->CurrentThread = CurrentThread;