Race Condition Question.

I have some simple filter driver, which will watch for close message for
certain file and send the close message to a user level application. That
application will scan the file for virus. This works fine until recent I
have the following situation. There is a foreground process will do two
exclusive open/write/close sequencially. When the user level application
get the first close message, it opens the file, at this time, that
foreground process tries to open the same file exclusively and it fails.
Obviously, people would not like this. Can anybody give me a hint how to
solve this? Is there any OpLock in the local system level?


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

I don’t see anything that would prevent you from blocking IRP_MJ_CREATE
aiming a file that your app is currently scanning.

Regards,

Vladimir

-----Original Message-----
From: xxxxx@math.uic.edu [mailto:xxxxx@math.uic.edu]
Sent: Thursday, November 15, 2001 1:38 PM
To: File Systems Developers
Subject: [ntfsd] Race Condition Question.

I have some simple filter driver, which will watch for close message for
certain file and send the close message to a user level application. That
application will scan the file for virus. This works fine until recent I
have the following situation. There is a foreground process will do two
exclusive open/write/close sequencially. When the user level application
get the first close message, it opens the file, at this time, that
foreground process tries to open the same file exclusively and it fails.
Obviously, people would not like this. Can anybody give me a hint how to
solve this? Is there any OpLock in the local system level?


You are currently subscribed to ntfsd as: xxxxx@Starbase.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

Keep a list of currently checked files. If an IRP_MJ_CREATE operation
requested look up your list. If th? opened file is there wait for checking
completes. Pass the IRP down.

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda Ltd.
http://www.vba.com.by

----- Original Message -----
From:
To: “File Systems Developers”
Sent: Thursday, November 15, 2001 9:37 PM
Subject: [ntfsd] Race Condition Question.

> I have some simple filter driver, which will watch for close message for
> certain file and send the close message to a user level application. That
> application will scan the file for virus. This works fine until recent I
> have the following situation. There is a foreground process will do two
> exclusive open/write/close sequencially. When the user level application
> get the first close message, it opens the file, at this time, that
> foreground process tries to open the same file exclusively and it fails.
> Obviously, people would not like this. Can anybody give me a hint how to
> solve this? Is there any OpLock in the local system level?
>
> —
> You are currently subscribed to ntfsd as: xxxxx@vba.com.by
> 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