when does file contexts deleted in mini filter driver?

hi all,

in my mini filter driver I’m creating file context in file creation post operation.
but after that I can’t unload mini filter because the file context are not deleted.
So my question is , do i need to delete file context in some place , or it should be deleted automatically ? after all fltsetcontext and fltgetcontext operations in my minifilters i have called “releasecontext” operations but contexts still not deleted and i can’t unload mini filter.

thanks in andvance

The release of the contexts is non-deterministic. It will occur ‘after’
the final close is sent for the object but I have seen FM hang on to
contexts for periods of time. That said, you should be able to unload
your driver. I would guess you are leaking a reference either on a
context or on some other reference counted structure such as a
file_name_info pointer.

If you enable verifier on your driver and attempt an unload, you should
get feedback as to what the problem is.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com http:</http:>
866.263.9295

------ Original Message ------
From: xxxxx@gmail.com
To: “Windows File Systems Devs Interest List”
Sent: 12/1/2015 11:01:57 PM
Subject: [ntfsd] when does file contexts deleted in mini filter driver?

>hi all,
>
>in my mini filter driver I’m creating file context in file creation
>post operation.
>but after that I can’t unload mini filter because the file context are
>not deleted.
>So my question is , do i need to delete file context in some place , or
>it should be deleted automatically ? after all fltsetcontext and
>fltgetcontext operations in my minifilters i have called
>“releasecontext” operations but contexts still not deleted and i can’t
>unload mini filter.
>
>thanks in andvance
>
>—
>NTFSD is sponsored by OSR
>
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:>