qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] aio_poll race condition.
@ 2018-11-16 19:02 remy.noel
  2018-11-16 19:02 ` [Qemu-devel] aio-posix: Fix concurrent aio_poll/set_fd_handler remy.noel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: remy.noel @ 2018-11-16 19:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Remy Noel

From: Remy Noel <remy.noel@blade-group.com>

It is possible for an io_poll callback to be concurrently executed along
with an aio_set_fd_handlers. This can cause all sorts of problems, like
a NULL callback or a bad opaque pointer.
We fixes that by using an remove/insert RCU scheme.

Please note that i did not test the win32 version.

Remy Noel (3):
  aio-posix: Fix concurrent aio_poll/set_fd_handler.
  util/aio-posix: Use RCU for handler insertion.
  aio: Do not use list_lock as a sync mechanism for aio_handlers
    anymore.

 include/block/aio.h |   4 +-
 util/aio-posix.c    | 148 ++++++++++++++++++++------------------------
 util/aio-win32.c    |  82 +++++++++---------------
 util/async.c        |   7 ++-
 4 files changed, 103 insertions(+), 138 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-07 13:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16 19:02 [Qemu-devel] [PATCH] aio_poll race condition remy.noel
2018-11-16 19:02 ` [Qemu-devel] aio-posix: Fix concurrent aio_poll/set_fd_handler remy.noel
2018-11-16 19:02 ` [Qemu-devel] util/aio-posix: Use RCU for handler insertion remy.noel
2018-12-06  9:23   ` Remy NOEL
2018-11-16 19:02 ` [Qemu-devel] aio: Do not use list_lock as a sync mechanism for aio_handlers anymore remy.noel
2018-12-07 10:09 ` [Qemu-devel] [PATCH] aio_poll race condition Philippe Mathieu-Daudé
2018-12-07 13:25   ` Remy NOEL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).