Author: sginsberg
Date: Wed Oct 29 11:24:36 2008
New Revision: 37068
URL: http://svn.reactos.org/svn/reactos?rev=37068&view=rev
Log:
- KeSetTimerEx: When canceling the insertion of an expired timer, don't forget to exit the dispatcher and return. Fixes crashes exposed by kernel32 Winetest "timer", caused by KiTimerTableListHead suddenly having broken entries.
- Also fix a comment -- KiExitDispatcher doesn't release the dispatcher lock, it is done in KxInsertTimer
Modified:
trunk/reactos/ntoskrnl/ke/timerobj.c
Modified: trunk/reactos/ntoskrnl/ke/timerobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/timerobj.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/timerobj.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/timerobj.c [iso-8859-1] Wed Oct 29 11:24:36 2008
@@ -398,6 +398,10 @@
/* Check if we need to do an interrupt */
if (RequestInterrupt) HalRequestSoftwareInterrupt(DISPATCH_LEVEL);
+
+ /* Exit the dispatcher and return the old state */
+ KiExitDispatcher(OldIrql);
+ return Inserted;
}
/* Set the time as Absolute */
@@ -419,7 +423,7 @@
Timer->Header.SignalState = FALSE;
KxInsertTimer(Timer, Hand);
- /* Release Dispatcher Lock */
+ /* Exit the dispatcher */
KiExitDispatcher(OldIrql);
/* Return old state */