IrpPending rule set (WDM)

Use these rules to verify that your driver correctly pends I/O request packets (IRP).

In this section

Topic Description

MarkDevicePower

The MarkDevicePower rule specifies that an IRP_MJ_POWER with IRP_MN_SET_POWER for SystemPowerState IRP going to S0 is pended.

MarkingInterlockedQueuedIrps

The MarkingInterlockedQueuedIrps rule specifies that the driver correctly marks the IRP as pending before it queues it in an interlocked fashion for further processing.

MarkingQueuedIrps

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.

MarkIrpPending

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.

MarkIrpPending2

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.

MarkPower

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.

MarkPowerDown

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.

MarkQueryRelations

The MarkQueryRelations rule specifies that the driver should pend the IRP_MN_QUERY_DEVICE_RELATIONS IRP.

MarkStartDevice

The MarkStartDevice rule specifies that the driver pends an IRP_MN_START_DEVICE IRP correctly. This rule only applies to FDO and FIDO drivers.

PendedCompletedRequest

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.

PendedCompletedRequest2

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.

PendedCompletedRequest3

The PendedCompletedRequest3 rule specifies that a pending IRP should not be completed with a call to IoCompleteRequest.

PendedCompletedRequestEx

The PendedCompletedRequestEx rule specifies that the driver should not call IoCompleteRequest for a pending IRP.

StartDeviceWait

The StartDeviceWait rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP.

StartDeviceWait2

The StartDeviceWait2 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP.

StartDeviceWait3

The StartDeviceWait3 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP.

StartDeviceWait4

The StartDeviceWait4 rule specifies that the driver should not call KeWaitForSingleObject in the context of start device IRP.

To select the IrpPending rule set

  1. Select your driver project (.vcxProj) in Microsoft Visual Studio. From the Driver menu, click Launch Static Driver Verifier….

  2. 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).