Catch failure to release the cancel spinlock. Would've spotted my error in

tcpip.sys.

svn path=/trunk/; revision=35581
This commit is contained in:
Art Yerkes 2008-08-23 23:04:15 +00:00
parent 0819ff13a1
commit 978a879fe9

View file

@ -970,12 +970,14 @@ NTAPI
IoCancelIrp(IN PIRP Irp)
{
KIRQL OldIrql;
KIRQL IrqlAtEntry;
PDRIVER_CANCEL CancelRoutine;
IOTRACE(IO_IRP_DEBUG,
"%s - Canceling IRP %p\n",
__FUNCTION__,
Irp);
ASSERT(Irp->Type == IO_TYPE_IRP);
IrqlAtEntry = KeGetCurrentIrql();
/* Acquire the cancel lock and cancel the IRP */
IoAcquireCancelSpinLock(&OldIrql);
@ -999,6 +1001,7 @@ IoCancelIrp(IN PIRP Irp)
/* Set the cancel IRQL And call the routine */
Irp->CancelIrql = OldIrql;
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
ASSERT(IrqlAtEntry == KeGetCurrentIrql());
return TRUE;
}