[PATCH v2 1/2] server: enable POLLIN when asyncs waiting in readq

Zebediah Figura zfigura at codeweavers.com
Tue Dec 7 11:29:00 CST 2021


On 12/6/21 19:30, Dongwan Kim wrote:
> When waiting asyncs exist after processing one,
> server should watch for the event POLLIN again.
> 
> Reselecting POLLIN would occur in async_destroy,
> if the contents of async remains.
> 
> It had worked on wine-6.7.
> 
> Signed-off-by: Dongwan Kim <kdw6485 at gmail.com>
> ---
>   server/async.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/server/async.c b/server/async.c
> index 1a564ff1a69..ec3396c930f 100644
> --- a/server/async.c
> +++ b/server/async.c
> @@ -512,12 +512,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
>           async_reselect( async );
>   
>           if (async->queue)
> -        {
> -            async->fd = NULL;
> -            list_remove( &async->queue_entry );
> -            async->queue = NULL;
>               release_object( async );
> -        }
>       }
>   }
>   
> 


This patch doesn't do what it says it's doing, and I wouldn't be 
surprised if this causes server crashes all over the place...

An async that gets to async_set_result() has already been terminated (we 
have an assert for it). That means that there's no more work to do for 
this async.

What situation exactly are you encountering? Can you please describe in 
detail?

If there's other asyncs queued in the given fd queue, we should in 
general be returning true from async_waiting(), which should in general 
cause POLLIN to be return from a get_poll_events callback. If there's 
not, I don't see why we should be returning POLLIN.



More information about the wine-devel mailing list