IRQL in IRP_MJ_XXX routines

  • Thread starter Thread starter QuasiCodo
  • Start date Start date
Q

QuasiCodo

I had a person ask me about the IRLQ at which the IRP_MJ_XXX routines
were called. I said I wasn't sure, but they can be called at
DISPATCH_LEVEL and PASSIVE_LEVEL. I look at the on line MSDN Lib and
found that the IRP_MJ_CLOSE is the only one that specifically says it is
called at PASSIVE_LEVEL.

Can anyone enlighten me on the details?

((&->
 
The general rule of thumb is that they are called at PASSIVE_LEVEL, but ...
I think you will find the wise choice is to code like they have been called
at > PASSIVE, if you can. The reason is that someone who "knows what they
are doing, and of course knows better" may call you from another device
driver at DISPATCH_LEVEL. A check for IRQL and an ASSERT is one means I have
seen to protect against such "know-it-alls". :)

There is no hard and fast rule that IRP_MJ_XXXX routines will be called at
PASSIVE. They should be, but you can get surprised.
 
Back
Top