[ros-diffs] [arty] 35581: Catch failure to release the cancel spinlock. Would've spotted my error in tcpip.sys.

arty at svn.reactos.org arty at svn.reactos.org
Sun Aug 24 01:04:16 CEST 2008


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?rev=35581&r1=35580&r2=35581&view=diff
==============================================================================
--- 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;
     }
 



More information about the Ros-diffs mailing list