Re[2]: So what if I deny create is post-create

> I know. I handle very carefully the supersedes and overwrites. Thanks for

the reply. I was worrying for strictly technical issues.

FsContext and FsContext2 from the FILE_OBJECT are both set after successful
create. If you just deny the operation, they will leak, and will
cause total mess in the system, beggining with sharing violations on the file.
Also, if the file was created as new by the create operation, denying post
create will not delete them.

Like Jan Milan said - DON’T deny file create in post-create operation.

L.

But IoCancelFileOpen will free the context structures, by sending the
IRP_MJ_CLOSE down. I know that it is not recommended to use it because it’s
buggy function in some situations when the lower devices are doing I/O on
the newly created file. Couldn’t I just send manually the IRP_MJ_CLOSE to
the file object and then deny it in post create ?

I know about CREATES, OVERWRITES, SUPERSEDE operation, don’t have to mention
those, I know the behavior.

Thanks for replies.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Monday, September 15, 2008 4:52 PM
To: Windows File Systems Devs Interest List
Subject: Re[2]: [ntfsd] So what if I deny create is post-create

I know. I handle very carefully the supersedes and overwrites. Thanks for
the reply. I was worrying for strictly technical issues.

FsContext and FsContext2 from the FILE_OBJECT are both set after successful
create. If you just deny the operation, they will leak, and will
cause total mess in the system, beggining with sharing violations on the
file.
Also, if the file was created as new by the create operation, denying post
create will not delete them.

Like Jan Milan said - DON’T deny file create in post-create operation.

L.


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Do some searching in this newsgroup and on Google about other side effects
of IoCancelFileOpen in the various versions of Windows. It is a very
dangerous function that will frequently fail in ways that can destroy files,
leak objects, etc. Just using a close in post create will not work since
the entire stack (all the way back to Win32 subsystem) has not processed the
close. Most of the problems are triggered by other filters that use the
FsContext to perform IO on that file. That causes interactions with the
CacheManager and MemoryManager that IoCancelFileOpen does not handle
properly.

“Bercea Gabriel” wrote in message news:xxxxx@ntfsd…
> But IoCancelFileOpen will free the context structures, by sending the
> IRP_MJ_CLOSE down. I know that it is not recommended to use it because
> it’s
> buggy function in some situations when the lower devices are doing I/O on
> the newly created file. Couldn’t I just send manually the IRP_MJ_CLOSE to
> the file object and then deny it in post create ?
>
> I know about CREATES, OVERWRITES, SUPERSEDE operation, don’t have to
> mention
> those, I know the behavior.
>
> Thanks for replies.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
> Sent: Monday, September 15, 2008 4:52 PM
> To: Windows File Systems Devs Interest List
> Subject: Re[2]: [ntfsd] So what if I deny create is post-create
>
>> I know. I handle very carefully the supersedes and overwrites. Thanks for
>> the reply. I was worrying for strictly technical issues.
>
> FsContext and FsContext2 from the FILE_OBJECT are both set after
> successful
> create. If you just deny the operation, they will leak, and will
> cause total mess in the system, beggining with sharing violations on the
> file.
> Also, if the file was created as new by the create operation, denying post
> create will not delete them.
>
> Like Jan Milan said - DON’T deny file create in post-create operation.
>
> L.
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

So what did I say ? I am aware of that, and I am already on the way for a
slicker design, on some paths

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Craig
Sent: Monday, September 15, 2008 6:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Re[2]: So what if I deny create is post-create

Do some searching in this newsgroup and on Google about other side effects
of IoCancelFileOpen in the various versions of Windows. It is a very
dangerous function that will frequently fail in ways that can destroy files,

leak objects, etc. Just using a close in post create will not work since
the entire stack (all the way back to Win32 subsystem) has not processed the

close. Most of the problems are triggered by other filters that use the
FsContext to perform IO on that file. That causes interactions with the
CacheManager and MemoryManager that IoCancelFileOpen does not handle
properly.

“Bercea Gabriel” wrote in message news:xxxxx@ntfsd…
> But IoCancelFileOpen will free the context structures, by sending the
> IRP_MJ_CLOSE down. I know that it is not recommended to use it because
> it’s
> buggy function in some situations when the lower devices are doing I/O on
> the newly created file. Couldn’t I just send manually the IRP_MJ_CLOSE to
> the file object and then deny it in post create ?
>
> I know about CREATES, OVERWRITES, SUPERSEDE operation, don’t have to
> mention
> those, I know the behavior.
>
> Thanks for replies.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
> Sent: Monday, September 15, 2008 4:52 PM
> To: Windows File Systems Devs Interest List
> Subject: Re[2]: [ntfsd] So what if I deny create is post-create
>
>> I know. I handle very carefully the supersedes and overwrites. Thanks for
>> the reply. I was worrying for strictly technical issues.
>
> FsContext and FsContext2 from the FILE_OBJECT are both set after
> successful
> create. If you just deny the operation, they will leak, and will
> cause total mess in the system, beggining with sharing violations on the
> file.
> Also, if the file was created as new by the create operation, denying post
> create will not delete them.
>
> Like Jan Milan said - DON’T deny file create in post-create operation.
>
> L.
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

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