Hartmut Birr wrote:
Hi,
in KeRundownThread is an ASSERT statement. What is the reason for that? ApcDisable is never changed. It is always 1 for mutex objects and always 0 for mutant objects. If a mutant object is on the list, ros does crash.
- Hartmut
Index: ntoskrnl/ke/kthread.c
--- ntoskrnl/ke/kthread.c (revision 14297) +++ ntoskrnl/ke/kthread.c (working copy) @@ -360,7 +360,7 @@
/* Get the Mutant */ Mutant = CONTAINING_RECORD(CurrentEntry, KMUTANT, MutantListEntry);
ASSERT(Mutant->ApcDisable);+// ASSERT(Mutant->ApcDisable);
It should actually be a bugcheck with THREAD_TERMINATE_HELD_MUTEX, but I only discovered this weird Bugcode much later after coding this. See some information here:
http://groups-beta.google.com/group/comp.os.ms-windows.nt.misc/browse_frm/th...
here:
/ // MessageId: *THREAD_TERMINATE_HELD_MUTEX* // // MessageText: // // A kernel thread terminated while holding a mutex //
Best regards, Alex Ionescu