Skip to content

Commit 68b8846

Browse files
esposembonzini
authored andcommitted
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 <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3c158eb commit 68b8846

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

migration/migration.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,7 +3168,10 @@ static void migration_completion(MigrationState *s)
31683168
} else if (s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
31693169
trace_migration_completion_postcopy_end();
31703170

3171+
qemu_mutex_lock_iothread();
31713172
qemu_savevm_state_complete_postcopy(s->to_dst_file);
3173+
qemu_mutex_unlock_iothread();
3174+
31723175
trace_migration_completion_postcopy_end_after_complete();
31733176
} else if (s->state == MIGRATION_STATUS_CANCELLING) {
31743177
goto fail;

0 commit comments

Comments
 (0)