about NdisIMDeInitializeDeviceInstance

hi!
I’ve built an ndis intermediate driver, It can intercepte the packets
between the IP layer and NIC.This driver works perfectly, but It stops
during uninstall sporadicly.I keep trace into it and find out the uninstall
process stops for about 5 to 10 minutest when
NdisIMDeInitializeDeviceInstance is called in the UnbindAdapterHandler,
then the HaltHandler(MPHalt) is called and uninstall success.This accident
occurs not frequently,in general,the uninstall works fluently.

I’ve keep a deeper trace under this situation.

************************NdisIMDeInitializeDeviceInstance****************
NDIS!NdisIMDeInitializeDeviceInstance:
fcc5d6d4 53 push ebx
kd> t
NDIS!NdisIMDeInitializeDeviceInstance+1:
fcc5d6d5 56 push esi
kd> t
NDIS!NdisIMDeInitializeDeviceInstance+2:
fcc5d6d6 8b74240c mov esi,[esp+0xc]
kd> t
NDIS!NdisIMDeInitializeDeviceInstance+6:
fcc5d6da 57 push edi
kd> t
NDIS!NdisIMDeInitializeDeviceInstance+7:
fcc5d6db bb010000c0 mov ebx,0xc0000001
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+c:
fcc5d6e0 8b7e08 mov edi,[esi+0x8]
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+f:
fcc5d6e3 8d4e20 lea ecx,[esi+0x20]
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+12:
fcc5d6e6 e822aefeff call NDIS!ndisReferenceRef (fcc4850d)
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+17:
fcc5d6eb 84c0 test al,al
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+19:
fcc5d6ed 7434 jz NDIS!NdisIMDeInitializeDeviceInstance+0x4f
(fcc5d723)
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+1b:
fcc5d6ef 8d8f90000000 lea ecx,[edi+0x90]
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+21:
fcc5d6f5 e813aefeff call NDIS!ndisReferenceRef (fcc4850d)
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+26:
fcc5d6fa 8b8e08010000 mov ecx,[esi+0x108]
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+2c:
fcc5d700 33d2 xor edx,edx
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+2e:
fcc5d702 c786e402000003000000 mov dword ptr [esi+0x2e4],0x3
kd> p
NDIS!NdisIMDeInitializeDeviceInstance+38:
fcc5d70c e89b20ffff call NDIS!ndisPnPRemoveDevice (fcc4f7ac)

In general case, the HaltHandler(MPHalt) should be called fllow the last
step, but unfortunately, it stops.

Why this happens?
Any help will be appreciated.

Best Regards


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com