[PATCH 1/5] server: Use STATUS_KERNEL_APC to indicate system APCs.

Jacek Caban jacek at codeweavers.com
Tue Feb 4 14:19:31 CST 2020


Hi Rémi,

On 04.02.2020 11:09, Rémi Bernon wrote:
>       }
> +    else if (get_error() == STATUS_KERNEL_APC)
> +    {
> +        if (!(apc = thread_dequeue_apc( current, 1 )))
> +            return;


Unlike user APC case (where we have a loop), thread_dequeue_apc will 
never return NULL here.


> +
> +        if (!(reply->apc_handle = alloc_handle( current->process, apc, SYNCHRONIZE, 0 )))
> +            return;


You leak apc in error case here and leave it in an inconsistent state 
(it will never finish, blocking the caller). And yeah, current code is 
not exactly right neither, but a bit better error handling would be nice.


Thanks,

Jacek




More information about the wine-devel mailing list