DO_DEVICE_INITIALIZING flag

Hi,

As I understand, DO_DEVICE_INITIALIZING flag,
when set, prevents the newly created device object
from receiving any I/O request.

What will happen with IRPs targeted to the device
object after another object has attached to it, but before
it clears DO_DEVICE_INITIALIZING flag?

Thanks in advance.

Kind regards,
Leonid.

Actually, the DO_DEVICE_INITIALIZING bit only comes into play when you are
attaching or opening a device object. In these cases, the operation will
fail.

This is the reason that in Windows XP the call
IoAttachDeviceToDeviceStackSafe was added - it closed a race condition
between attachment and returning the pointer to the attached-to device
object. In Windows 2000, you have to protect against this within your own
code.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Hope to see you at the next OSR file systems class October 7, 2002!

-----Original Message-----
From: Leonid Zhigunov [mailto:xxxxx@progate.spb.ru]
Sent: Tuesday, May 21, 2002 10:13 AM
To: File Systems Developers
Subject: [ntfsd] DO_DEVICE_INITIALIZING flag

Hi,

As I understand, DO_DEVICE_INITIALIZING flag,
when set, prevents the newly created device object
from receiving any I/O request.

What will happen with IRPs targeted to the device
object after another object has attached to it, but before
it clears DO_DEVICE_INITIALIZING flag?

Thanks in advance.

Kind regards,
Leonid.


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

Thank you.

Does this mean that IRPs are delivered to the filter device
object after attach operation succeeds, even if the filter has
DO_DEVICE_INITIALIZING flag set?

“Tony Mason” wrote in message news:xxxxx@ntfsd…
>
> Actually, the DO_DEVICE_INITIALIZING bit only comes into play when you are
> attaching or opening a device object. In these cases, the operation will
> fail.
>
> This is the reason that in Windows XP the call
> IoAttachDeviceToDeviceStackSafe was added - it closed a race condition
> between attachment and returning the pointer to the attached-to device
> object. In Windows 2000, you have to protect against this within your own
> code.
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
> Hope to see you at the next OSR file systems class October 7, 2002!
>

Yes, that is exactly what it means.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

Hope to see you at the next OSR file systems class October 7, 2002!

-----Original Message-----
From: Leonid Zhigunov [mailto:xxxxx@progate.spb.ru]
Sent: Tuesday, May 21, 2002 11:53 AM
To: File Systems Developers
Subject: [ntfsd] Re: DO_DEVICE_INITIALIZING flag

Thank you.

Does this mean that IRPs are delivered to the filter device object after
attach operation succeeds, even if the filter has DO_DEVICE_INITIALIZING
flag set?

“Tony Mason” wrote in message news:xxxxx@ntfsd…
>
> Actually, the DO_DEVICE_INITIALIZING bit only comes into play when you
> are attaching or opening a device object. In these cases, the
> operation will fail.
>
> This is the reason that in Windows XP the call
> IoAttachDeviceToDeviceStackSafe was added - it closed a race condition
> between attachment and returning the pointer to the attached-to device
> object. In Windows 2000, you have to protect against this within your
> own code.
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
> Hope to see you at the next OSR file systems class October 7, 2002!
>


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

Another device cannot attach, since IoGetDeviceObjectPointer calls ZwCreateFile internally, which in turn cause the CREATE IRP,
which will be failed.

Max

“Leonid Zhigunov” wrote in message
news:LYRIS-2023-53316-2002.05.21-10.09.48–maxim#xxxxx@lists.osr.com…
> Hi,
>
> As I understand, DO_DEVICE_INITIALIZING flag,
> when set, prevents the newly created device object
> from receiving any I/O request.
>
> What will happen with IRPs targeted to the device
> object after another object has attached to it, but before
> it clears DO_DEVICE_INITIALIZING flag?
>
> Thanks in advance.
>
> Kind regards,
> Leonid.
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>