Guy,
KeEnterCriticalRegion (or FsRtlEnterFileSystem) should be called PRIOR to
obtaining your first ERESOURCE and released AFTER releasing your last
ERESOURCE. Since KeEnterCriticalRegion will allow nesting, the safest
approach is to call KeEnterCriticalRegion before you acquire the ERESOURCE
and then release it AFTER you release the ERESOURCE.
Actually, the most prudent thing to do here is to always call
KeEnterCriticalRegion around the ownership of any dispatcher object because
this avoids re-entrancy via kernel mode APCs that could cause you to violate
your locking hierarcy which would lead to deadlocks.
If your computer “gets stuck” then you must determine what is causing your
deadlock. Try using the “!locks” command in the debugger to examine the
ERESOURCE locks in the system that have both owning and waiting threads for
them.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Sent: Tuesday, March 19, 2002 12:46 PM
To: File Systems Developers
Subject: [ntfsd] ExAcquireResourceSharedLite() and APCs
Hi All,
When I use ExAcquireResourceSharedLite (, TRUE) running on
Windows XP Professional check build with SoftIce, I get the following
message:
EX: resource: APCs still enabled before resource
acquire !!!
After few such messages I get a blue screen with BugCheck 0x0000008E.
I tried to use KeEnterCriticalRegion() before acquiring the resource,
but then the computer gets stuck (rather than crushing).
I didn't see any documentation for this in the DDK.
Could anyone help on this...
Guy.
---
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to %%email.unsub%%