[ros-diffs] [hbirr] 20884: Fix the check for an empty list.

hbirr at svn.reactos.org hbirr at svn.reactos.org
Sun Jan 15 09:51:40 CET 2006


Fix the check for an empty list.
Modified: trunk/reactos/ntoskrnl/ke/apc.c
  _____  

Modified: trunk/reactos/ntoskrnl/ke/apc.c
--- trunk/reactos/ntoskrnl/ke/apc.c	2006-01-15 08:49:26 UTC (rev
20883)
+++ trunk/reactos/ntoskrnl/ke/apc.c	2006-01-15 08:51:20 UTC (rev
20884)
@@ -287,6 +287,8 @@

     PKAPC QueuedApc;
     NTSTATUS Status;
 
+    ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
+
     /* Acquire the lock (only needed on MP) */
     KeAcquireSpinLockAtDpcLevel(&Thread->ApcQueueLock);
 
@@ -790,7 +792,7 @@
         ApcListEntry = Thread->ApcState.ApcListHead[UserMode].Flink;
 
         /* Is it empty now? */
-        if (!ApcListEntry)
+        if (ApcListEntry == &Thread->ApcState.ApcListHead[UserMode])
         {
             /* Release the lock and return */
             KeReleaseSpinLock(&Thread->ApcQueueLock, OldIrql);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20060115/ff812e53/attachment.html


More information about the Ros-diffs mailing list