mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- Remove root device hack.
- Add event dereferencing hack (bug report #2240). svn path=/trunk/; revision=27141
This commit is contained in:
parent
ca4a88afa0
commit
12130e71ab
2 changed files with 10 additions and 11 deletions
|
@ -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 |
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue