我写了一个以Passthru为基础的ndis中间层驱动,这个驱动经常在离开MiniportSendPackets函数的时候蓝屏,错误代码是IRQL_NOT_LESS_OR_EQUAL,请问可能是怎么造成的。
我知道这个问题很难回答,但希望各位高手能够救救小弟。不胜感激。
出错时的堆栈如下:
nt!DbgBreakPointWithStatus+0x4
nt!KeDeregisterBugCheckReasonCallback+0x6c7
nt!Kei386EoiHelper+0x285d
nt!ExReleaseResourceLite+0x210
mrxsmb+0x3bb93
mrxsmb+0x3a2a9
mrxsmb+0x3024b
mrxsmb+0x307d1
nt!IofCallDriver+0x32
nt!RtlUnicodeStringToAnsiString+0x2a7
nt!NtDeviceIoControlFile+0x2a
nt!ZwYieldExecution+0xb96
nt!KeInitializeTimer+0x10c
ntdll+0x10551
正常时候的堆栈如下:
CMVPNS!FilterOBPacket(struct _ADAPT * pAdapt = 0x81913618, struct _NDIS_PACKET * pPktDesc = 0x818f0df0, unsigned char * pBDecision = 0xfa9474d1 "")+0x3c5 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\vc works\china mobile remote shell3\cmvpn candidate7\fileter.c @ 407]
CMVPNS!MPSendPackets(void * MiniportAdapterContext = 0x81913618, struct _NDIS_PACKET ** PacketArray = 0xfa947528, unsigned int NumberOfPackets = 1)+0x235 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\vc works\china mobile remote shell3\cmvpn candidate7\miniport.c @ 309]
WARNING: Stack unwind information not available. Following frames may be wrong.
NDIS!NdisInitializeString+0x6d1
psched!RegisterPsComponent+0x81fa
NDIS!NdisDprFreePacketNonInterlocked+0x1b0
tcpip!IPTransmit+0x24df
tcpip!IPTransmit+0x2583
tcpip!IPTransmit+0xac7
tcpip!IPTransmit+0x86a
tcpip!IPRegisterProtocol+0x4673
tcpip!IPRegisterProtocol+0x443a
tcpip!IPRegisterProtocol+0x44a0
tcpip!IPRegisterProtocol+0x3cec
nt!IofCallDriver+0x32
netbt+0x2391
netbt+0x2754
netbt+0x2608
netbt+0x1c118
netbt+0x1c1aa
netbt+0x28a4
nt!IofCallDriver+0x32
mrxsmb+0x3c75e
mrxsmb+0x3bac4
mrxsmb+0x3b9e0
mrxsmb+0x3bb93
mrxsmb+0x3a2a9
mrxsmb+0x3024b
mrxsmb+0x307d1
nt!IofCallDriver+0x32
nt!RtlUnicodeStringToAnsiString+0x2a7
ntdll+0x1056d
ntdll+0x105c8
irq 处理,你在离开的时候需要判断确保下当前的irql