Patch by Hartmut Birr
Work around what seems to be a bug in GCC for optimized builds. See
http://reactos.com:8080/archives/public/ros-dev/2005-June/003842.html
Modified: trunk/reactos/ntoskrnl/io/driver.c

Modified: trunk/reactos/ntoskrnl/io/driver.c
--- trunk/reactos/ntoskrnl/io/driver.c	2005-06-21 04:52:46 UTC (rev 16205)
+++ trunk/reactos/ntoskrnl/io/driver.c	2005-06-21 16:35:41 UTC (rev 16206)
@@ -1659,16 +1659,16 @@
   KeAcquireSpinLock(&DriverReinitListLock,
 		    &Irql);
 
-  if (DriverReinitTailEntry == NULL)
+  Entry = DriverReinitTailEntry;
+
+  KeReleaseSpinLock(&DriverReinitListLock,
+		    Irql);
+
+  if (Entry == NULL)
   {
-    KeReleaseSpinLock(&DriverReinitListLock,
-		      Irql);
     return;
   }
 
-  KeReleaseSpinLock(&DriverReinitListLock,
-		    Irql);
-
   for (;;)
   {
     Entry = ExInterlockedRemoveHeadList(&DriverReinitListHead,