From: Emanuele Giuseppe Esposito <[email protected]> qemu_savevm_state_complete_postcopy assumes the iothread lock (BQL) to be held, but instead it isn't.
Signed-off-by: Emanuele Giuseppe Esposito <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> --- migration/migration.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index bb909781b7..6ac807ef3d 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; -- 2.31.1
