aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2021-10-05 04:07:51 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-05 13:10:29 +0200
commit68b88468f6a4144bf0217624fbb0ff6b0fa1d694 (patch)
treeca371bc7196b9373e1ae9a72cc833a68d30ca50c /migration/migration.c
parent3c158eba1e11e52dbd0e14fc8fd40ec80abca436 (diff)
downloadqemu-68b88468f6a4144bf0217624fbb0ff6b0fa1d694.zip
qemu-68b88468f6a4144bf0217624fbb0ff6b0fa1d694.tar.gz
qemu-68b88468f6a4144bf0217624fbb0ff6b0fa1d694.tar.bz2
migration: add missing qemu_mutex_lock_iothread in migration_completion
qemu_savevm_state_complete_postcopy assumes the iothread lock (BQL) to be held, but instead it isn't. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20211005080751.3797161-3-eesposit@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index bb90978..6ac807e 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3168,7 +3168,10 @@ static void migration_completion(MigrationState *s)
} else if (s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
trace_migration_completion_postcopy_end();
+ qemu_mutex_lock_iothread();
qemu_savevm_state_complete_postcopy(s->to_dst_file);
+ qemu_mutex_unlock_iothread();
+
trace_migration_completion_postcopy_end_after_complete();
} else if (s->state == MIGRATION_STATUS_CANCELLING) {
goto fail;