Never call IoCompleteRequest while holding a spin lock. Attempting to complete an IRP while holding a spin lock can cause deadlocks.

svn path=/trunk/; revision=27429
This commit is contained in:
Christoph von Wittich 2007-07-06 17:14:24 +00:00
parent f0124e6d34
commit 9f79a749af
2 changed files with 6 additions and 6 deletions

View file

@ -797,10 +797,10 @@ ClassStartIo(
/* Go to next packet and complete this request */
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_KEYBOARD_INCREMENT);
IoStartNextPacket(DeviceObject, FALSE);
KeReleaseSpinLock(&DeviceExtension->SpinLock, oldIrql);
IoCompleteRequest(Irp, IO_KEYBOARD_INCREMENT);
IoStartNextPacket(DeviceObject, FALSE);
}
else
{

View file

@ -773,10 +773,10 @@ ClassStartIo(
/* Go to next packet and complete this request */
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_MOUSE_INCREMENT);
IoStartNextPacket(DeviceObject, FALSE);
KeReleaseSpinLock(&DeviceExtension->SpinLock, oldIrql);
IoCompleteRequest(Irp, IO_MOUSE_INCREMENT);
IoStartNextPacket(DeviceObject, FALSE);
}
else
{