Context driver sample

in the context sample (part of the windows driver samples repo) -- the usage of ERESOURCE for locking is demonstrated
I was wondering , how is that ? they use ExAcquireResourceExclusiveLite (callable at APC_LEVEL >=) in post opetrations (DISPATCH_LEVEL >= ) ...

am I missing something here?

So, quickly looking at this CtxAcquireResourceExclusive is called

  • Post Create where you are guearanteed to come back at PASSIVE
  • Post SetInfo where you have said FLT_PREOP_SYNCHRONIZE in pre. This guarantees that youare at PASSIVE (but not necessarily in the same thread)
  • And in PreCleanup, PreCreate and PreSetinfo when you are also PASSIVE.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.