MarkingQueuedIrps rule (wdm)
The MarkingQueuedIrps rule specifies that the driver calls IoMarkIrpPending for an IRP that requires further processing only while holding a spin lock. This rule applies only when the driver adds the IRP to a driver-managed queue.
Specifically, the driver violates this rule only when all of the following events occur.
- The driver calls one of the following routines to add an IRP to a driver-managed queue:
The driver returns a status of STATUS_PENDING for the IRP.
Drivers should call IoMarkIrpPending for a queued IRP only while holding a spin lock. Otherwise, an IRP could be dequeued, completed by another driver routine, and freed by the system before the call to IoMarkIrpPending occurs, thereby causing a crash.
For more information, see Synchronizing IRP Cancellation.
How to test
|At compile time|
Run Static Driver Verifier and specify the MarkingQueuedIrps rule.Use the following steps to run an analysis of your code:
For more information, see Using Static Driver Verifier to Find Defects in Drivers.
Build date: 11/16/2013