Hi,
Introduction:
I have implemented a FSFD based on the sfilter sample provided with the latest DKK/IFS, my filter is built of two drivers: one is fixed ( the FSFD ) and one is unloadable ( a function driver ), the two drivers share resources allocated in a common address-space, to synchronize access to the resource I have implemented a simple Readers-Writers mechanism, this mechanism use a single spin-lock in combination with a mutex and a readers reference count, writers lock and release the mutex directly while readers lock & release the mutex when the ref-count is Zero.
The shared resource is being accessed when a file is being created for execution in IRP_MJ_CREATE.
The problem:
Occasionally, when releasing the resource for reading KeReleaseMutex triggers a BUGCODE_PSS_CRASH_DONE exception.
What may cause this problem [???] While locking the mutex I set the KPROCESSOR_MODE according to IRP::RequestorMode, still, this didn’t resolve the problem… what else may cause this problem? May this be related to the IRQL I am running at ( although if it did I would except it will happen at KeWaitForSingleObject and not at KeReleaseMutex )? How can I figure-out what IRQL I am running at ?
All of the Readers-Writers objects are handled by the fixed driver so it is not possible they where deleted from memory while running…
Any help comment or sample would be appreciated.
Naddav
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online & more. Check it out!
What is the bug check code. If the code is 0x8e then its a
kernel_mode_exception_not_handled. IIRC, old ddk had a value 0x8e for
bugcode_pss_crash_done which is misleading…
If think you should cut paste the output of !analyze -v.
-Kiran
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nadav
Sent: Monday, June 20, 2005 7:04 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] KeReleaseMutex causes an exception…
Hi,
Introduction:
I have implemented a FSFD based on the sfilter sample provided with the
latest DKK/IFS, my filter is built of two drivers: one is fixed ( the FSFD )
and one is unloadable ( a function driver ), the two drivers share resources
allocated in a common address-space, to synchronize access to the resource I
have implemented a simple Readers-Writers mechanism, this mechanism use a
single spin-lock in combination with a mutex and a readers reference count,
writers lock and release the mutex directly while readers lock & release the
mutex when the ref-count is Zero.
The shared resource is being accessed when a file is being created for
execution in IRP_MJ_CREATE.
The problem:
Occasionally, when releasing the resource for reading KeReleaseMutex
triggers a BUGCODE_PSS_CRASH_DONE exception.
What may cause this problem [???] While locking the mutex I set the
KPROCESSOR_MODE according to IRP::RequestorMode, still, this didn’t resolve
the problem. what else may cause this problem? May this be related to the
IRQL I am running at ( although if it did I would except it will happen at
KeWaitForSingleObject and not at KeReleaseMutex )? How can I figure-out what
IRQL I am running at ?
All of the Readers-Writers objects are handled by the fixed driver so it is
not possible they where deleted from memory while running…
Any help comment or sample would be appreciated.
Naddav
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online & more. Check it
http:</http:> out! —
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed to
ntfsd as: xxxxx@calsoftinc.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
> to synchronize access to the resource I have implemented
a simple Readers-Writers mechanism, this mechanism use
Just make sure that I understand - by “resource” in your post,
you mean ERESOURCE or just some data ?
And if “resource” is a data, why not to use ERESOURCE, which
IS the Readers-Writers mechanism by its definition ?
L.
Hi Ladislav Zezula,
Thanks for your response, Well, the problem with KeReleaseMutex was that the thread releasing the mutex was different then the thread that acquired it, I have changed the synchronization object to KEVENT and everything works fine.
However, usage of ERESOURCE will be much smarter…
ThanX, Naddav
Ladislav Zezula wrote:
> to synchronize access to the resource I have implemented
> a simple Readers-Writers mechanism, this mechanism use
Just make sure that I understand - by “resource” in your post,
you mean ERESOURCE or just some data ?
And if “resource” is a data, why not to use ERESOURCE, which
IS the Readers-Writers mechanism by its definition ?
L.
—
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com