ExAcquireResourceExclusiveLite() usage

The rules for ExAcquireResourceExclusiveLite() say I have to disable normal
kernel APCs by raising IRQL to APC_LEVEL or by calling
KeEnterCriticalSection(). But the DDK documentation doesn’t say whether
I’m allowed to re-lower my IRQL or call KeLeaveCriticalSection() while
holding the resource lock.

Does anyone have the definitive word?

I seem to be hitting a deadlock when calling KeLeaveCriticalSection()
sometimes. (Other threads are trying to acquire the resource I own, while
my thread has been handed a kernel-mode APC and is suspended in
KeWaitForSingleObject() waiting on some semaphore I don’t control.)

Carl Appellof
VERITAS Software Corporation


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are disabling APC delivery in order to prevent a recursive entry
into your filesystem in that thread deadlocking against the resource you
acquired.

The case you are hitting is exactly why you need to keep them disabled;
its all about lock order. You’ll probably find a loop if you drill
through that semaphore.

-----Original Message-----
From: xxxxx@veritas.com [mailto:xxxxx@veritas.com]
Sent: Thursday, April 12, 2001 6:51 AM
To: File Systems Developers
Subject: [ntfsd] ExAcquireResourceExclusiveLite() usage

The rules for ExAcquireResourceExclusiveLite() say I have to disable
normal
kernel APCs by raising IRQL to APC_LEVEL or by calling
KeEnterCriticalSection(). But the DDK documentation doesn’t say whether

I’m allowed to re-lower my IRQL or call KeLeaveCriticalSection() while
holding the resource lock.

Does anyone have the definitive word?

I seem to be hitting a deadlock when calling KeLeaveCriticalSection()
sometimes. (Other threads are trying to acquire the resource I own,
while
my thread has been handed a kernel-mode APC and is suspended in
KeWaitForSingleObject() waiting on some semaphore I don’t control.)

Carl Appellof
VERITAS Software Corporation


You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com