Bewerken

Delen via


C28144

warning C28144: Within a cancel routine, at the point of exit, the IRQL in Irp->CancelIrql should be the current IRQL.

Additional information

The value need not be restored by any specific function, but must be restored before exit. PREfast was unable to determine that it was restored to the required value.

When the driver's Cancel routine exits, the value of the Irp->CancelIrql member is not the current IRQL. Typically, this error occurs when the driver does not call IoReleaseCancelSpinLock with the IRQL that was supplied by the most recent call to IoAcquireCancelSpinLock.

For more information about Cancel routines, see Canceling IRPs. For information specific to this warning, see Points to Consider When Canceling IRPs.

Example

The following code example elicits this warning.

IoReleaseCancelSpinLock(PASSIVE_LEVEL);

The following code example avoids this warning.

IoReleaseCancelSpinLock(Irp->CancelIrql);