提交 4231c88d 编写于 作者: P Paolo Bonzini

aio: test node->deleted before calling io_flush

Otherwise, there could be a case where io_flush accesses freed
memory because it should not have been called.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 a915f4bc
......@@ -122,7 +122,7 @@ bool aio_wait(AioContext *ctx)
* Otherwise, if there are no AIO requests, qemu_aio_wait() would
* wait indefinitely.
*/
if (node->io_flush) {
if (!node->deleted && node->io_flush) {
if (node->io_flush(node->opaque) == 0) {
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册