IrpPending rule set (WDM)
Use these rules to verify that your driver correctly pends I/O request packets (IRP).
In this section
Topic | Description |
---|---|
The MarkDevicePower rule specifies that an IRP_MJ_POWER with IRP_MN_SET_POWER for SystemPowerState IRP going to S0 is pended. |
|
The MarkingInterlockedQueuedIrps rule specifies that the driver correctly marks the IRP as pending before it queues it in an interlocked fashion for further processing. |
|
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. |
|
The MarkIrpPending rule specifies that whenever a driver dispatch routine calls IoMarkIrpPending, the driver returns STATUS_PENDING when the dispatch routine ends. See MarkIrpPending2 for a complimentary specification. |
|
The MarkIrpPending2 rule specifies that if a dispatch routine returns STATUS_PENDING, it has called IoMarkIrpPending or passed the IRP to the lower driver. See MarkIrpPending for a complimentary specification. |
|
The MarkPower rule specifies that an IRP_MJ_POWER with IRP_MN_SET_POWER for SystemPowerState IRP going to S0 is pended. This rule only applies to FDO and FIDO drivers. |
|
The MarkPowerDown rule specifies that an IRP_MJ_POWER with IRP_MN_SET_POWER for SystemPowerState IRP going from s0 to [S1...S5] is pended. |
|
The MarkQueryRelations rule specifies that the driver should pend the IRP_MN_QUERY_DEVICE_RELATIONS IRP. |
|
The MarkStartDevice rule specifies that the driver pends an IRP_MN_START_DEVICE IRP correctly. This rule only applies to FDO and FIDO drivers. |
|
The PendedCompletedRequest rule specifies that a driver's dispatch routine does not return STATUS_PENDING on an IRP if the driver has called IoCompleteRequest on the incoming IRP. |
|
The PendedCompletedRequest2 rule specifies that a wait is required after a call to IoCallDriver or PoCallDriver because the dispatch routine could complete a pending IRP. |
|
The PendedCompletedRequest3 rule specifies that a pending IRP should not be completed with a call to IoCompleteRequest. |
|
The PendedCompletedRequestEx rule specifies that the driver should not call IoCompleteRequest for a pending IRP. |
|
The StartDeviceWait rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP. |
|
The StartDeviceWait2 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP. |
|
The StartDeviceWait3 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP. |
|
The StartDeviceWait4 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP. |
To select the IrpPending rule set
Select your driver project (.vcxProj) in Microsoft Visual Studio. From the Driver menu, click Launch Static Driver Verifier….
Click the Rules tab. Under Rule Sets, select IrpPending.
To select the default rule set from a Visual Studio developer command prompt window, specify IrpPending.sdv with the /check option. For example:
msbuild /t:sdv /p:Inputs="/check:IrpPending.sdv" mydriver.VcxProj /p:Configuration="Win8 Release" /p:Platform=Win32
For more information, see Using Static Driver Verifier to Find Defects in Drivers and Static Driver Verifier commands (MSBuild).