MemAfterReqCompletedIntIoctl 规则 (kmdf)

MemAfterReqCompletedIntIoctl 规则指定在 EvtIoInternalDeviceControl 回调函数中,I/O 请求完成后无法访问框架内存对象。

在驱动程序的 EvtIoInternalDeviceControl 回调函数中, 在 I/O 请求上调用 WdfRequestCompleteWdfRequestCompleteWithInformation 或 WdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoost 后,无法访问通过调用 WdfRequestRetrieveInputMemory 或 WdfRequestRetrieveOutputMemory 方法检索的框架内存对象。

此规则考虑以下两种内存访问方法:

WdfRequestRetrieveInputMemoryWdfRequestRetrieveOutputMemory

驱动程序模型:KMDF

如何测试

编译时

运行 静态驱动程序验证程序 并指定 MemAfterReqCompletedIntIoctl 规则。

使用以下步骤运行代码分析:
  1. 准备代码 (使用角色类型声明) 。
  2. 运行静态驱动程序验证程序。
  3. 查看和分析结果。

有关详细信息,请参阅 使用静态驱动程序验证程序查找驱动程序中的缺陷

适用于

WdfRequestCompleteWdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoostWdfRequestRetrieveInputMemoryWdfRequestRetrieveOutputMemory