Author: cgutman
Date: Sun Mar 18 22:28:14 2012
New Revision: 56185
URL: http://svn.reactos.org/svn/reactos?rev=56185&view=rev
Log:
[NTOSKRNL]
- Forgot this dereference
- Unloading works now, but there are many bugs in the device stacks that prevent it from occurring
- Usbhub will unload properly when a hub is removed for a driver update, but usbstor won't unload when all usb storage devices have been removed
- Work needs to be done to fix issues like this
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Mar 18 22:28:14 2012
@@ -2610,7 +2610,7 @@
Status = PipCallDriverAddDevice(DeviceNode, FALSE, DriverObject);
/* Remove the extra reference */
- //ObDereferenceObject(DriverObject);
+ ObDereferenceObject(DriverObject);
}
else
{
Author: cgutman
Date: Sun Mar 18 21:38:45 2012
New Revision: 56183
URL: http://svn.reactos.org/svn/reactos?rev=56183&view=rev
Log:
[NTOSKRNL]
- Remove an extra deference to the device object that happened inside the IopDeleteDevice function (called by Ob when the reference count is 0)
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Mar 18 21:38:45 2012
@@ -1158,12 +1158,9 @@
/* All children must be deleted before a parent is deleted */
ASSERT(!DeviceNode->Child);
+ ASSERT(DeviceNode->PhysicalDeviceObject);
KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
-
- ASSERT(DeviceNode->PhysicalDeviceObject);
-
- ObDereferenceObject(DeviceNode->PhysicalDeviceObject);
/* Get previous sibling */
if (DeviceNode->Parent && DeviceNode->Parent->Child != DeviceNode)