RequestCompleted rule (kmdf)

The DeferredRequestCompleted rule specifies that for a non-filter driver each request presented to the driver's default I/O queue must be completed, unless the request is deferred or forwarded, or if WdfRequestStopAcknowledge is called.

An I/O request presented to the driver's default queue through one of the queue callback functions must be completed before it exits from the I/O request callback functions, except in the following cases:

The rule is verified when the driver exits from the following callback functions:

The I/O queue callback functions for request presentation are EvtIoDefault, EvtIoRead, EvtIoWrite, EvtIoDeviceControl, and EvtIoInternalDeviceControl

Driver modelKMDF

How to test

At compile time

Run Static Driver Verifier and specify the RequestCompleted rule.

Use the following steps to run an analysis of your code:
  1. Prepare your code (use role type declarations).
  2. Run Static Driver Verifier.
  3. View and analyze the results.

For more information, see Using Static Driver Verifier to Find Defects in Drivers.

Applies to

WdfDeviceEnqueueRequest
WdfDmaTransactionInitialize
WdfDmaTransactionInitializeUsingRequest
WdfIoTargetSendInternalIoctlOthersSynchronously
WdfIoTargetSendInternalIoctlSynchronously
WdfIoTargetSendIoctlSynchronously
WdfIoTargetSendReadSynchronously
WdfIoTargetSendWriteSynchronously
WdfRequestComplete
WdfRequestCompleteWithInformation
WdfRequestCompleteWithPriorityBoost
WdfRequestForwardToIoQueue
WdfRequestMarkCancelable
WdfRequestMarkCancelableEx
WdfRequestSend
WdfRequestStopAcknowledge
WdfWorkItemEnqueue

 

 

Send comments about this topic to Microsoft

Show: