]> git.proxmox.com Git - mirror_qemu.git/commit - migration/savevm.c
migration: hold AioContext lock for loadvm qemu_fclose()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 15 Jun 2017 16:38:10 +0000 (17:38 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:13 +0000 (14:51 +0200)
commit1575829d2aaced8ce6a5728d8e9fbbdee8f80885
tree5fcc0c236c414ca5cd6cfe54863d842755ab4929
parent0d2fac8ede5623b5bb825bd002633cd65db5159e
migration: hold AioContext lock for loadvm qemu_fclose()

migration_incoming_state_destroy() uses qemu_fclose() on the vmstate
file.  Make sure to call it inside an AioContext acquire/release region.

This fixes an 'qemu: qemu_mutex_unlock: Operation not permitted' abort
in loadvm.

This patch closes the vmstate file before ending the drained region.
Previously we closed the vmstate file after ending the drained region.
The order does not matter.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
migration/savevm.c