Regola MemAfterReqCompletedIoctlA (kmdf)

La regola MemAfterReqCompletedIoctlA specifica che all'interno della funzione di callback EvtIoDeviceControl non è possibile accedere all'oggetto memoria framework dopo il completamento della richiesta di I/O.

All'interno della funzione di callback EvtIoDeviceControl del driver, non è possibile accedere all'oggetto memoria del framework recuperato chiamando i metodi WdfRequestRetrieveInputMemory o WdfRequestRetrieveOutputMemory dopo aver chiamato WdfRequestComplete, WdfRequestCompleteWithInformation o WdfRequestCompleteWithPriorityBoost nella richiesta di I/O.

Questa regola considera i metodi di accesso alla memoria seguenti:

WdfMemoryGetBufferWDF_MEMORY_DESCRIPTOR_INIT_HANDLEWdfMemoryAssignBufferWdfMemoryCopyToBufferWdfMemoryCopyFromBufferWdfObjectReferenceWdfObjectDereferenceWdfObjectDelete

Modello di driver: KMDF

Come eseguire il test

In fase di compilazione

Eseguire Static Driver Verifier e specificare la regola MemAfterReqCompletedIoctlA .

Usa i passaggi descritti di seguito per eseguire un'analisi del codice:
  1. Prepara il codice (usa dichiarazioni di tipo ruolo).
  2. Esegui Driver Verifier statico.
  3. Visualizza e analizza i risultati.

Per altre informazioni, vedere Using Static Driver Verifier to Find Defects in Drivers.For more information, see Using Static Driver Verifier to Find Defects in Drivers.

Si applica a

WDF_MEMORY_DESCRIPTOR_INIT_HANDLEWdfMemoryAssignBufferWdfMemoryCopyFromBufferWdfMemoryCopyToBufferWdfMemoryGetBufferWdfObjectDeleteWdfObjectDereference WdfObjectDereferenceWdfObjectReferenceWdfRequestCompleteWdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoostWdfRequestRetrieveInputMemoryWdfRequestRetrieveOutputMemory