Author: arty
Date: Sat Aug 23 18:04:15 2008
New Revision: 35581
URL:
http://svn.reactos.org/svn/reactos?rev=35581&view=rev
Log:
Catch failure to release the cancel spinlock. Would've spotted my error in
tcpip.sys.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/irp.c
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 [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Sat Aug 23 18:04:15 2008
@@ -970,12 +970,14 @@
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 @@
/* Set the cancel IRQL And call the routine */
Irp->CancelIrql = OldIrql;
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
+ ASSERT(IrqlAtEntry == KeGetCurrentIrql());
return TRUE;
}