[ros-dev] Re: [ros-svn] [hbirr] 14964: Do always set the UserIosb of an irp in IoSecondStageCompletion.

Alex Ionescu ionucu at videotron.ca
Tue May 3 20:02:18 CEST 2005


Hartmut Birr wrote:

>Alex Ionescu wrote:
>
>  
>
>>hbirr at svn.reactos.com wrote:
>>
>>    
>>
>>>Do always set the UserIosb of an irp in IoSecondStageCompletion.
>>>
>>>
>>>
>>>Updated files:
>>>trunk/reactos/ntoskrnl/io/irp.c
>>> 
>>>
>>>      
>>>
>>This is incorrect.
>>
>>1) The IOSB should not always be set. Create a driver and fail an
>>operation that you send to yourself by an IRP. Make that IRP not
>>SYNCH_API, or better yet, make sure you don't have a File Object.
>>You will notice that the Status Block is not touched.
>>
>>2) The IOSB is not checked if it exists, it should ALWAYS be there.
>>IRPs without a IOSB are invalid. To verify this, set the IOSB of your
>>IRP to 0 and run Windows with a Debugger. You will see that it will
>>break in many places, because Windows has simply placed SEH to make
>>sure that the write is valid. So the correct thing to do is wrap the
>>write in SEH, which protects both against invalid pointers and zero
>>ones, but that still doesn't mean they are"valid"  and should be
>>checked that way.
>>
>>Best regards,
>>Alex Ionescu
>>_______________________________________________
>>Ros-dev mailing list
>>Ros-dev at reactos.com
>>http://reactos.com:8080/mailman/listinfo/ros-dev
>>
>>
>>    
>>
>Please look at bug #609.
>
>- Hartmut
>
>
>  
>
Ok, well that indicates that our VFAT driver is broken. It should be 
fixed instead of breaking correct code.

Best regards,
Alex Ionescu


More information about the Ros-dev mailing list