Completion routine not called

  1. Why my completion routine for MJ_CREATE is sometimes not called? What
    I have is: receive MJ_CREATE, set completion routine, it gets never
    called and then I receive some MJ_QUERY_INFORMATION and MJ_READ for that
    file object although I haven’t seen the create to finish. At the MJ_READ
    time the system crashes, bug check.
  2. Is there a function to obtain the available non-paged memory? Maybe I
    have some memory leaks with late effects.

Daniel

Run the Driver Verifier for memory leaks.
This sounds like incorrect pending or completing (by either your driver
or some other driver in the stack) of IRPs.

Daniel Turcanu wrote:

  1. Why my completion routine for MJ_CREATE is sometimes not called? What
    I have is: receive MJ_CREATE, set completion routine, it gets never
    called and then I receive some MJ_QUERY_INFORMATION and MJ_READ for that
    file object although I haven’t seen the create to finish. At the MJ_READ
    time the system crashes, bug check.
  2. Is there a function to obtain the available non-paged memory? Maybe I
    have some memory leaks with late effects.

Daniel


You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.

I think this could happen if there is another FS filter driver lower on the
stack that causes
reentrancy. Here’s a scenario:

Your driver gets MJ_CREATE, sets a completion routine, and forwards to the
next lower driver.
Lower driver also sets a completion routine and forwards on to NTFS.
NTFS completes the CREATE.
I/O manager calls lower driver’s completion routine.
Lower driver calls ZwQueryInformationFile or ObQueryNameString, or some
other function that will reenter from the top of the I/O stack. YOU will
see the MJ_QUERY_INFORMATION before your completion routine is called. YOUR
completion routine won’t be called until the lower driver’s completion
routine returns.

Carl

“Daniel Turcanu” wrote in message news:xxxxx@ntfsd…
>
> 1. Why my completion routine for MJ_CREATE is sometimes not called? What
> I have is: receive MJ_CREATE, set completion routine, it gets never
> called and then I receive some MJ_QUERY_INFORMATION and MJ_READ for that
> file object although I haven’t seen the create to finish. At the MJ_READ
> time the system crashes, bug check.
> 2. Is there a function to obtain the available non-paged memory? Maybe I
> have some memory leaks with late effects.
>
> Daniel
>
>
>
>
>
>