summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorStefan Hajnoczi2017-06-15 18:38:10 +0200
committerKevin Wolf2017-06-26 14:51:13 +0200
commit1575829d2aaced8ce6a5728d8e9fbbdee8f80885 (patch)
tree5fcc0c236c414ca5cd6cfe54863d842755ab4929 /migration
parentthrottle: Update throttle-groups.c documentation (diff)
downloadqemu-1575829d2aaced8ce6a5728d8e9fbbdee8f80885.tar.gz
qemu-1575829d2aaced8ce6a5728d8e9fbbdee8f80885.tar.xz
qemu-1575829d2aaced8ce6a5728d8e9fbbdee8f80885.zip
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/savevm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index b08df04d59..c7a49c93c5 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2300,11 +2300,11 @@ int load_snapshot(const char *name, Error **errp)
aio_context_acquire(aio_context);
ret = qemu_loadvm_state(f);
+ migration_incoming_state_destroy();
aio_context_release(aio_context);
bdrv_drain_all_end();
- migration_incoming_state_destroy();
if (ret < 0) {
error_setg(errp, "Error %d while loading VM state", ret);
return ret;