Hi,
This is more about peace of mind really…
"A driver must fail a query-remove IRP if any of the following are true:
If removing the device could result in losing data… "
A solution I inherited (from an OSR sample) is to count ALL the irps
‘active’ on my driver. Pretty robust I thought! But then I changed the
sample.
The question I have is at the design/conceptual level.
Does this approach oblige me to put completion routines on all requests
that might go pending on lower drivers? Or is it safe to count down the
active irps after IoSkip… & IoCallDriver.
In other words if I return OK, will the system attempt a device removal
from a stack while there are irps active beneath me on the stack (and
presumably crash)?
In my driver this condition could (theoretically) occur if a lower driver
returns pending to IoCallDriver, though I ASSERT that it doesn’t do this
and in practice it seems OK.
Thanks for any advice on this matter.
Jack
PS Actually its the undefined non-wmi system control that I can’t find
assurances for, everything else I chain is OK, one way or another. So
either:
a) “SYSCTL never goes pending” or
b) “devices aren’t removed with Irps active on their stack”
is what I want to hear, and will get me design sign-off.