本文介绍了在IoCompleteRequest之后获取Spinlock会导致蓝屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在对认证进行一些测试(USB设备),然后在测试PC上发生蓝屏,之后分析转储文件,指向调用KeAquireSpinLock的部分代码(使用deviceExtension作为参数的一部分)。
这样的事情:



IoCompleteRequest(Irp,IO_NO_INCREMENT);


KeAcquireSpinLock( & deviceExtension-> IOCountLock,& oldIrql);   //崩溃在这里



驱动程序在设备上工作正常,它只是在认证测试期间发生(并发硬件和操作系统) ;以及即插即用测试)。文档中提到,只要在
调用IoCompleteRequest之前释放旋转锁定例程就可以调用旋转锁定例程,但调用会在此时间之后发生。建议/意见将不胜感激。谢谢。



解决方案

I've been doing some testing for the certification (USB device), then a blue screen happens on the test PC, after analyzing the dump files later on it points to a part of the code that calls KeAquireSpinLock (with the deviceExtension as part of parameter). Something like this:

IoCompleteRequest(Irp, IO_NO_INCREMENT);

KeAcquireSpinLock(&deviceExtension->IOCountLock, &oldIrql);  // Crashes here

The driver is working fine on the device though, it just happens during certification tests (Concurrent Hardware and OS  and Plug and Play tests). The documentation mentions though that it's OK to call spin lock routines as long as they are freed  before calling IoCompleteRequest, but the calls happen after this time around. An suggestions/advices will be appreciated. Thanks.

解决方案


这篇关于在IoCompleteRequest之后获取Spinlock会导致蓝屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 19:01