From 2552915ae3d7d4b7a8d67ee4d6efc28045dfbf24 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 4 Oct 2012 06:16:53 +0000 Subject: [PATCH] [NTOS]: CORE-6204 #resolve #time 10m #comment Do not touch NextEntry after removing it, instead restart the scan at the head of the list (checked against w2k3sp1). svn path=/trunk/; revision=57474 --- reactos/ntoskrnl/ke/thrdobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/reactos/ntoskrnl/ke/thrdobj.c index 57f7a68a4e5..a76bd698555 100644 --- a/reactos/ntoskrnl/ke/thrdobj.c +++ b/reactos/ntoskrnl/ke/thrdobj.c @@ -470,9 +470,6 @@ KeRundownThread(VOID) 0); } - /* Move on, but save NextEntry before we remove */ - NextEntry = NextEntry->Flink; - /* Now we can remove it */ RemoveEntryList(&Mutant->MutantListEntry); @@ -487,6 +484,9 @@ KeRundownThread(VOID) /* Wake the Mutant */ KiWaitTest(&Mutant->Header, MUTANT_INCREMENT); } + + /* Move on */ + NextEntry = Thread->MutantListHead.Flink; } /* Release the Lock */