Author: cgutman
Date: Thu Mar 8 23:02:45 2012
New Revision: 56093
URL: http://svn.reactos.org/svn/reactos?rev=56093&view=rev
Log:
[NTOSKRNL]
- Add an assertion to catch a bug in the I/O manager
Modified:
trunk/reactos/ntoskrnl/io/iomgr/driver.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Thu Mar 8 23:02:45 2012
@@ -59,6 +59,9 @@
PAGED_CODE();
DPRINT1("Deleting driver object '%wZ'\n", &DriverObject->DriverName);
+
+ /* There must be no device objects remaining at this point */
+ ASSERT(!DriverObject->DeviceObject);
/* Get the extension and loop them */
DriverExtension = IoGetDrvObjExtension(DriverObject)->
Author: cgutman
Date: Thu Mar 8 02:43:47 2012
New Revision: 56087
URL: http://svn.reactos.org/svn/reactos?rev=56087&view=rev
Log:
[NTOSKRNL]
- Dereference the correct device object (the one who asked for shutdown notification) instead of whatever happens to be on the top of the device stack
- Fix flag issues
Modified:
trunk/reactos/ntoskrnl/io/iomgr/device.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] Thu Mar 8 02:43:47 2012
@@ -174,9 +174,12 @@
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
}
+ /* Remove the flag */
+ ShutdownEntry->DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED;
+
/* Get rid of our reference to it */
- ObDereferenceObject(DeviceObject);
-
+ ObDereferenceObject(ShutdownEntry->DeviceObject);
+
/* Free the shutdown entry and reset the event */
ExFreePoolWithTag(ShutdownEntry, TAG_SHUTDOWN_ENTRY);
KeClearEvent(&Event);
@@ -228,9 +231,12 @@
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
}
+ /* Remove the flag */
+ ShutdownEntry->DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED;
+
/* Get rid of our reference to it */
- ObDereferenceObject(DeviceObject);
-
+ ObDereferenceObject(ShutdownEntry->DeviceObject);
+
/* Free the shutdown entry and reset the event */
ExFreePoolWithTag(ShutdownEntry, TAG_SHUTDOWN_ENTRY);
KeClearEvent(&Event);
@@ -1485,6 +1491,9 @@
PSHUTDOWN_ENTRY ShutdownEntry;
PLIST_ENTRY NextEntry;
KIRQL OldIrql;
+
+ /* Remove the flag */
+ DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED;
/* Acquire the shutdown lock and loop the shutdown list */
KeAcquireSpinLock(&ShutdownListLock, &OldIrql);
@@ -1543,9 +1552,6 @@
/* Release the shutdown lock */
KeReleaseSpinLock(&ShutdownListLock, OldIrql);
-
- /* Now remove the flag */
- DeviceObject->Flags &= ~DO_SHUTDOWN_REGISTERED;
}
/*
Author: jgardou
Date: Wed Mar 7 22:57:23 2012
New Revision: 56085
URL: http://svn.reactos.org/svn/reactos?rev=56085&view=rev
Log:
Just get the whole tree...
Added:
branches/c++-bringup/
- copied from r56084, trunk/