mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 14:53:16 +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)
|
IoCancelIrp(IN PIRP Irp)
|
||||||
{
|
{
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
KIRQL IrqlAtEntry;
|
||||||
PDRIVER_CANCEL CancelRoutine;
|
PDRIVER_CANCEL CancelRoutine;
|
||||||
IOTRACE(IO_IRP_DEBUG,
|
IOTRACE(IO_IRP_DEBUG,
|
||||||
"%s - Canceling IRP %p\n",
|
"%s - Canceling IRP %p\n",
|
||||||
__FUNCTION__,
|
__FUNCTION__,
|
||||||
Irp);
|
Irp);
|
||||||
ASSERT(Irp->Type == IO_TYPE_IRP);
|
ASSERT(Irp->Type == IO_TYPE_IRP);
|
||||||
|
IrqlAtEntry = KeGetCurrentIrql();
|
||||||
|
|
||||||
/* Acquire the cancel lock and cancel the IRP */
|
/* Acquire the cancel lock and cancel the IRP */
|
||||||
IoAcquireCancelSpinLock(&OldIrql);
|
IoAcquireCancelSpinLock(&OldIrql);
|
||||||
|
@ -999,6 +1001,7 @@ IoCancelIrp(IN PIRP Irp)
|
||||||
/* Set the cancel IRQL And call the routine */
|
/* Set the cancel IRQL And call the routine */
|
||||||
Irp->CancelIrql = OldIrql;
|
Irp->CancelIrql = OldIrql;
|
||||||
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
||||||
|
ASSERT(IrqlAtEntry == KeGetCurrentIrql());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue