Devs,
I have a driver that can have an IRP in progress for up to an infinite
amount of time, if the external clock is lost. I have a customer who
terminates his application while one of the IRP buffers is still being
filled, which results in the driver corrupting the heap. I do have an I/O
timer going, and after some seconds the IRP will time out and complete.
Meanwhile the application is long gone.
One of our esteemed list members suggested adding a cancel routine to the
in-process IRP that turns off the flow of data and completes the IRP. I
plan to implement this, but…
There is quite a bit of superstition surrounding the use and misuse of
cancel routines. Under some conditions you want to grab the cancel
spinlock, unless you are managing your own queues (I am), yadda yadda yadda.
So the question: in the case of an in-process IRP, one that has already made
is past the StartIO routine, can I assume that I will not have anything
pathological happen if I simply set a cancel routine before I start copying
data, Queue my DPC if the in-process cancel fires, and either way set the
cancel routine to NULL in my DPC after a successful or unsuccessful
transfer?
Thanks,
Evan
Evan Hillman
General Standards
435-755-0309
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