- Remove root device hack.

- Add event dereferencing hack (bug report #2240).

svn path=/trunk/; revision=27141
This commit is contained in:
Dmitry Gorbachev 2007-06-11 15:02:23 +00:00
parent ca4a88afa0
commit 12130e71ab
2 changed files with 10 additions and 11 deletions

View file

@ -37,18 +37,9 @@ IopAttachDeviceToDeviceStackSafe(IN PDEVICE_OBJECT SourceDevice,
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 |

View file

@ -346,8 +346,16 @@ IopCompleteRequest(IN PKAPC Apc,
/* 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");
}
}
/*