|
From: | Paolo Bonzini |
Subject: | Re: [PATCH for-8.0] aio-posix: fix race between epoll upgrade and aio_set_fd_handler() |
Date: | Thu, 23 Mar 2023 06:02:36 +0100 |
+ /* The list must not change while we add fds to epoll */
+ if (!qemu_lockcnt_dec_if_lock(&ctx->list_lock)) {
+ return false;
+ }
+
+ ok = fdmon_epoll_try_enable(ctx);
+
+ qemu_lockcnt_unlock(&ctx->list_lock);
+
+ if (!ok) {
+ fdmon_epoll_disable(ctx);
+ }
+ return ok;
}
void fdmon_epoll_setup(AioContext *ctx)
--
2.39.2
[Prev in Thread] | Current Thread | [Next in Thread] |