mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- Fix a serious bug in Kernel Queues. A condition existed where an inserted kernel queue with a timeout would crash the system once the thread waiting on it had its wait aborted or completed.
- Thanks a lot to Thomas for his brutal test application which allowed me to discover this bug and the bugs addressed in the previous commits (related to the wait list and thread scheduler list corruption). svn path=/trunk/; revision=23057
This commit is contained in:
parent
1f1857f96d
commit
514aa8290f
3 changed files with 14 additions and 6 deletions
|
@ -764,7 +764,7 @@ KeInitializeThread(PKPROCESS Process,
|
|||
/* Initialize the Suspend Semaphore */
|
||||
KeInitializeSemaphore(&Thread->SuspendSemaphore, 0, 128);
|
||||
|
||||
/* FIXME OPTIMIZATION OF DOOM. DO NOT ENABLE FIXME */
|
||||
/* Setup the timer */
|
||||
Timer = &Thread->Timer;
|
||||
KeInitializeTimer(Timer);
|
||||
TimerWaitBlock = &Thread->WaitBlock[TIMER_WAIT_BLOCK];
|
||||
|
|
|
@ -390,6 +390,10 @@ KeRemoveQueue(IN PKQUEUE Queue,
|
|||
&WaitBlock->WaitListEntry;
|
||||
Timer->Header.WaitListHead.Blink =
|
||||
&WaitBlock->WaitListEntry;
|
||||
WaitBlock->WaitListEntry.Flink =
|
||||
&Timer->Header.WaitListHead;
|
||||
WaitBlock->WaitListEntry.Blink =
|
||||
&Timer->Header.WaitListHead;
|
||||
|
||||
/* Create Timer */
|
||||
KiInsertTimer(Timer, *Timeout);
|
||||
|
@ -427,8 +431,8 @@ KeRemoveQueue(IN PKQUEUE Queue,
|
|||
/* Check if we had a timeout */
|
||||
if (Timeout)
|
||||
{
|
||||
/* FIXME: Fixup interval */
|
||||
DPRINT1("FIXME!!!\n");
|
||||
DPRINT1("If you see this message, contact Alex ASAP\n");
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -360,7 +360,9 @@ KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode,
|
|||
return WaitStatus;
|
||||
}
|
||||
|
||||
/* FIXME: Fixup interval */
|
||||
/* Check if we had a timeout */
|
||||
DPRINT1("If you see this message, contact Alex ASAP\n");
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
|
||||
/* Acquire again the lock */
|
||||
|
@ -533,7 +535,8 @@ KeWaitForSingleObject(PVOID Object,
|
|||
/* Check if we had a timeout */
|
||||
if (Timeout)
|
||||
{
|
||||
/* FIXME: Fixup interval */
|
||||
DPRINT1("If you see this message, contact Alex ASAP\n");
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -813,7 +816,8 @@ KeWaitForMultipleObjects(IN ULONG Count,
|
|||
/* Check if we had a timeout */
|
||||
if (Timeout)
|
||||
{
|
||||
/* FIXME: Fixup interval */
|
||||
DPRINT1("If you see this message, contact Alex ASAP\n");
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
|
||||
/* Acquire again the lock */
|
||||
|
|
Loading…
Reference in a new issue