Re: [PATCH for-8.0 v2] aio-posix: fix race between epoll upgrade and aio_set_fd_handler()

2023-03-27 Thread Kevin Wolf
Am 23.03.2023 um 15:48 hat Stefan Hajnoczi geschrieben: > If another thread calls aio_set_fd_handler() while the IOThread event > loop is upgrading from ppoll(2) to epoll(7) then we might miss new > AioHandlers. The epollfd will not monitor the new AioHandler's fd, > resulting in hangs. > > Take

[PATCH for-8.0 v2] aio-posix: fix race between epoll upgrade and aio_set_fd_handler()

2023-03-23 Thread Stefan Hajnoczi
If another thread calls aio_set_fd_handler() while the IOThread event loop is upgrading from ppoll(2) to epoll(7) then we might miss new AioHandlers. The epollfd will not monitor the new AioHandler's fd, resulting in hangs. Take the AioHandler list lock while upgrading to epoll. This prevents