mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
- 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 svn path=/trunk/; revision=42054
This commit is contained in:
@@ -34,7 +34,6 @@ SIZE_T RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToWrite ) {
|
||||
|
||||
if( CurrentIrql <= APC_LEVEL ) {
|
||||
ExAcquireFastMutex( &RecMutex->Mutex );
|
||||
RecMutex->OldIrql = CurrentIrql;
|
||||
while( RecMutex->Locked ) {
|
||||
ExReleaseFastMutex( &RecMutex->Mutex );
|
||||
Status = KeWaitForSingleObject( &RecMutex->StateLockedEvent,
|
||||
@@ -44,6 +43,7 @@ SIZE_T RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToWrite ) {
|
||||
NULL );
|
||||
ExAcquireFastMutex( &RecMutex->Mutex );
|
||||
}
|
||||
RecMutex->OldIrql = CurrentIrql;
|
||||
RecMutex->Locked = TRUE;
|
||||
RecMutex->Writer = ToWrite;
|
||||
RecMutex->CurrentThread = CurrentThread;
|
||||
|
||||
Reference in New Issue
Block a user