Author: dgorbachev
Date: Mon Jun 11 19:02:23 2007
New Revision: 27141
URL:
http://svn.reactos.org/svn/reactos?rev=27141&view=rev
Log:
- Remove root device hack.
- Add event dereferencing hack (bug report #2240).
Modified:
trunk/reactos/ntoskrnl/io/iomgr/device.c
trunk/reactos/ntoskrnl/io/iomgr/irp.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 (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c Mon Jun 11 19:02:23 2007
@@ -37,18 +37,9 @@
SourceDeviceExtension = IoGetDevObjExtension(SourceDevice);
ASSERT(SourceDeviceExtension->AttachedTo == NULL);
- /* FIXME: ROS HACK */
- if (AttachedDevice->Flags & DO_DEVICE_INITIALIZING)
- {
- DPRINT1("Io: CRITICAL: Allowing attach to device which hasn't "
- "cleared its DO_DEVICE_INITIALIZING flag. Fix the damn "
- "thing: %p %wZ\n",
- AttachedDevice,
- &AttachedDevice->DriverObject->DriverName);
- }
-
/* Make sure that it's in a correct state */
- if ((IoGetDevObjExtension(AttachedDevice)->ExtensionFlags &
+ if ((AttachedDevice->Flags & DO_DEVICE_INITIALIZING) ||
+ (IoGetDevObjExtension(AttachedDevice)->ExtensionFlags &
(DOE_UNLOAD_PENDING |
DOE_DELETE_PENDING |
DOE_REMOVE_PENDING |
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/irp.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c Mon Jun 11 19:02:23 2007
@@ -346,8 +346,16 @@
/* Check if this is an Asynch API */
if (!(Irp->Flags & IRP_SYNCHRONOUS_API))
{
+ /* HACK */
+ if (*((PULONG)(Irp->UserEvent) - 1) != 0x87878787)
+ {
/* Dereference the event */
ObDereferenceObject(Irp->UserEvent);
+ }
+ else
+ {
+ DPRINT1("Not an executive event -- should not be
dereferenced\n");
+ }
}
/*