[NTOS:EX] Worker threads must not exit with a critical region held. CORE-13734

This commit is contained in:
Thomas Faber 2018-03-07 11:02:55 +01:00
parent 282b4397e0
commit 2b8f4f6e24
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -162,7 +162,7 @@ ProcessLoop:
WorkItem->WorkerRoutine(WorkItem->Parameter); WorkItem->WorkerRoutine(WorkItem->Parameter);
/* Make sure APCs are not disabled */ /* Make sure APCs are not disabled */
if (Thread->Tcb.SpecialApcDisable) if (Thread->Tcb.CombinedApcDisable != 0)
{ {
/* We're nice and do it behind your back */ /* We're nice and do it behind your back */
DPRINT1("Warning: Broken Worker Thread: %p %p %p came back " DPRINT1("Warning: Broken Worker Thread: %p %p %p came back "
@ -170,7 +170,8 @@ ProcessLoop:
WorkItem->WorkerRoutine, WorkItem->WorkerRoutine,
WorkItem->Parameter, WorkItem->Parameter,
WorkItem); WorkItem);
Thread->Tcb.SpecialApcDisable = 0; ASSERT(Thread->Tcb.CombinedApcDisable == 0);
Thread->Tcb.CombinedApcDisable = 0;
} }
/* Make sure it returned at right IRQL */ /* Make sure it returned at right IRQL */