Skip to content
Snippets Groups Projects
Commit 4231c88d authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a915f4bc
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment