file filter

hello,all
i use file filter for such things:

in read callback:
if read some file is what i want
reporto otherthread
keInitEvent
KeWaitForSingleObject
contine
in other thread:
open the file
write some data to the file
KeSetEvent
return
my question is:
in other thread i can open the file but when write some data to the file the system
have no action and is blocked
the reason is in read callback KeWaitForSingleObject i can open the file but i can not write file?

You could be hitting deadlock for any number of reasons, an obvious one is
that the write is triggering a paging read which blocks in your pre-read
callback. Do you filter paging reads as well as user reads?

/Rod

Rod Widdowson

Steading System Software

wrote in message news:xxxxx@ntfsd…
> hello,all
> i use file filter for such things:
>
> in read callback:
> if read some file is what i want
> reporto otherthread
> keInitEvent
> KeWaitForSingleObject
> contine
> in other thread:
> open the file
> write some data to the file
> KeSetEvent
> return
> my question is:
> in other thread i can open the file but when write some data to
> the file the system
> have no action and is blocked
> the reason is in read callback KeWaitForSingleObject i can open
> the file but i can not write file?
>
>
>

“Do you filter paging reads as well as user reads?”

i am in my file filter driver to write
how can i do to viod this question?

If it’s a minifilter you set FLTFL_OPERATION_REGISTRATION_SKIP_PAGING_IO in
the flags field of your registration look in
Data->Iopb->IrpFlags for IRP_PAGING_IO.

If its legacy look at at Irp->Flags for IRP_PAGING_IO.

wrote in message news:xxxxx@ntfsd…
> “Do you filter paging reads as well as user reads?”
>
> i am in my file filter driver to write
> how can i do to viod this question?
>

in other thread
i use zwcreatefile and zwwritefile
i use ioxxxxfsdsyxxx
these are all same