LocalIrpProcessing rule set (WDM)
Use these rules to verify that your driver correctly handles I/O request packets (IRP) that are created by the driver.
In this section
Topic | Description |
---|---|
The IoAllocateComplete rule specifies that a driver should not call IoCompleteRequest if the IRP was created with IoAllocateIrp. |
|
The IoAllocateFree rule specifies that a driver should use IoFreeIrp only on IRPs that were previously allocated with IoAllocateIrp. |
|
The IoAllocateForward rule specifies that if an IRP is generated by a call to IoAllocateIrp, the driver must set a completion routine before calling IoCallDriver or PoCallDriver. |
|
The IoAllocateIrpSignalEventInCompletion rule specifies that the driver should call KeSetEvent in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoAllocateIrpSignalEventInCompletion2 rule specifies that KeSetEvent needs to be called in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoAllocateIrpSignalEventInCompletion3 rule specifies that KeSetEvent needs to be called in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoAllocateIrpSignalEventInCompletionTimeout rule reports a defect if it detects that this driver will wait indefinitely until the lower driver returns, as the IRP’s event is required to be signaled in the completion routine. |
|
The IoBuildDeviceControlNoFree rule specifies that a driver that calls IoBuildDeviceIoControlRequest must not call IoFreeIrp. |
|
The IoBuildDeviceControlWait rule specifies that the KeWaitForSingleObject routine should be called if IoCallDriver or PoCallDriver returns STATUS_PENDING. |
|
The IoBuildDeviceControlWaitTimeout rule reports a defect if it detects that this driver will wait indefinitely until the lower driver returns, as the IRP’s event is required to be signaled in the completion routine. |
|
The IoBuildDeviceIoControlSetEvent rule specifies that a driver that calls IoBuildDeviceIoControlRequest must not call KeSetEvent if the driver supplies a pointer to a caller-allocated and initialized event object. The KeSetEvent does not need to be called by the driver for this IRP. |
|
The IoBuildFsdComplete rule specifies that a driver should not call IoCompleteRequest if the IRP was created with IoBuildAsynchronousFsdRequest. |
|
The IoBuildFsdForward rule specifies that a completion routine must be set before a driver calls IoCallDriver or PoCallDriver if the IRP is generated by a call to IoBuildAsynchronousFsdRequest. |
|
The IoBuildFsdFree rule specifies that a driver should use IoFreeIrp only on IRPs it previously allocated with IoBuildAsynchronousFsdRequest. |
|
The IoBuildFsdIrpSignalEventInCompletion rule specifies that the driver should call KeSetEvent in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoBuildFsdIrpSignalEventInCompletion2 rule specifies that KeSetEvent needs to be called in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoBuildFsdIrpSignalEventInCompletion3 rule specifies that KeSetEvent needs to be called in the completion routine when the Irp->PendingReturned flag is set and the completion routine is processing a locally created asynchronous IRP. |
|
The IoBuildFsdIrpSignalEventInCompletionTimeout rule reports a defect when the driver waits indefinitely until the lower driver returns, as the IRP’s event is required to be signaled in the completion routine. |
|
The IoBuildSynchronousFsdRequestNoFree rule specifies that a driver that calls IoBuildSynchronousFsdRequest must not call IoFreeIrp. |
|
The IoBuildSynchronousFsdRequestWait rule specifies that KeWaitForSingleObject should be called in the case that IoCallDriver or PoCallDriver returns STATUS_PENDING. |
|
The IoBuildSynchronousFsdRequestWaitTimeout rule reports a defect if it detects that this driver will wait indefinitely until the lower driver returns, as the IRP’s event is required to be signaled in the completion routine. |
|
The RequestedPowerIrp rule specifies that driver calls PoRequestPowerIrp with the |
To select the LocalIrpProcessing 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 LocalIrpProcessing.
To select the default rule set from a Visual Studio developer command prompt window, specify LocalIrpProcessing.sdv with the /check option. For example:
msbuild /t:sdv /p:Inputs="/check:LocalIrpProcessing.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).