[PATCH 1/2] ntdll: Set socket IO status before calling server if operation is completed.

Paul Gofman pgofman at codeweavers.com
Thu Dec 16 12:59:33 CST 2021


On 12/16/21 21:50, Zebediah Figura (she/her) wrote:
> On 12/16/21 12:43, Paul Gofman wrote:
>> Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
>> ---
>>      If the operation is completed before the server call then the 
>> completion
>>      will be sent during the server call and another thread may 
>> receive it
>>      before the iosb status is set. It looks like we shouldn't 
>> normally have failure
>>      status from server once our operation already succeeded.
>
> That doesn't sound right. The server shouldn't queue completion during 
> the recv_socket server call, but rather during the subsequent wait on 
> the async object [i.e. wait_async()]. In that case we should have 
> already filled the IOSB.
>
Oh, yeah, it is probably triggered by async_satisfied(). I briefly 
checked and it looks like it is the second patch alone does the job here.

So I suggest to just ignore this one, the second patch applies cleanly 
without this one.


Just for better understanding, why a separate wait on async is needed 
even if the socket operation already succeeded before the server call?




More information about the wine-devel mailing list