mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
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:
parent
0819ff13a1
commit
978a879fe9
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue