Make sure to hold the DPC lock until the DPC list has been emptied
This fixes a crash in Lord of the rings: The fellowship of the ring
This commit is contained in:
parent
8d92992a6b
commit
639f42c318
|
@ -462,7 +462,7 @@ void ExecuteDpcQueue()
|
|||
// Set DpcRoutineActive to support KeIsExecutingDpc:
|
||||
g_DpcData.IsDpcActive.test_and_set();
|
||||
KeGetCurrentPrcb()->DpcRoutineActive = TRUE; // Experimental
|
||||
LeaveCriticalSection(&(g_DpcData.Lock));
|
||||
|
||||
EmuLog(LOG_LEVEL::DEBUG, "Global DpcQueue, calling DPC object 0x%.8X at 0x%.8X", pkdpc, pkdpc->DeferredRoutine);
|
||||
|
||||
// Call the Deferred Procedure :
|
||||
|
@ -472,7 +472,6 @@ void ExecuteDpcQueue()
|
|||
pkdpc->SystemArgument1,
|
||||
pkdpc->SystemArgument2);
|
||||
|
||||
EnterCriticalSection(&(g_DpcData.Lock));
|
||||
KeGetCurrentPrcb()->DpcRoutineActive = FALSE; // Experimental
|
||||
g_DpcData.IsDpcActive.clear();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue