Jacek Caban : server: Choose newer async object when searching from client pointer.
Alexandre Julliard
julliard at winehq.org
Tue Feb 14 16:24:50 CST 2017
Module: wine
Branch: master
Commit: 13204d87cfc35b436e50925701b55e55f1ab165a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13204d87cfc35b436e50925701b55e55f1ab165a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 10 16:05:39 2017 +0100
server: Choose newer async object when searching from client pointer.
This fixes a race. Client may release and reuse async pointer while
processing APC_ASYNC_IO. It is, however, guaranteed that
get_async_result will be called on the newest one known to the server.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/async.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/async.c b/server/async.c
index ec46103..ef548d1 100644
--- a/server/async.c
+++ b/server/async.c
@@ -255,7 +255,7 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
else async->iosb = NULL;
list_add_tail( &queue->queue, &async->queue_entry );
- list_add_tail( &thread->process->asyncs, &async->process_entry );
+ list_add_head( &thread->process->asyncs, &async->process_entry );
grab_object( async );
if (queue->fd) set_fd_signaled( queue->fd, 0 );
More information about the wine-cvs
mailing list