RequestCompleted rule (kmdf)
The RequestCompleted 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 request was deferred (to a DPC or work item, for example). In this case, you can use the DeferredRequestCompleted rule.
The request was forwarded to an I/O target or to another queue
The request was delivered to the framework (by calling WdfDeviceEnqueueRequest)
WdfRequestStopAcknowledge was called
The rule is verified when the driver exits from the following callback functions:
EvtFileClose, EvtFileCleanup, EvtDeviceSelfManagedIoSuspend, EvtDeviceSelfManagedIoFlush, EvtDeviceSelfManagedIoCleanup, EvtDeviceShutdownNotification, EvtDeviceSurpriseRemoval, EvtCleanupCallback or EvtDestroyCallback for the device
Driver model: KMDF
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:
For more information, see Using Static Driver Verifier to Find Defects in Drivers.
WdfDeviceEnqueueRequest WdfDmaTransactionInitialize WdfDmaTransactionInitializeUsingRequest WdfIoTargetSendInternalIoctlOthersSynchronously WdfIoTargetSendInternalIoctlSynchronously WdfIoTargetSendIoctlSynchronously WdfIoTargetSendReadSynchronously WdfIoTargetSendWriteSynchronously WdfRequestComplete WdfRequestCompleteWithInformation WdfRequestCompleteWithPriorityBoost WdfRequestForwardToIoQueue WdfRequestMarkCancelable WdfRequestMarkCancelableEx WdfRequestSend WdfRequestStopAcknowledge WdfWorkItemEnqueue