From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> migration_incoming_state_destroy doesn't really destroy, it cleans up. After a loadvm it's called, but the loadvm command can be run twice, and so destroying an init-once mutex breaks on the second loadvm.
Reported-by: Stafford Horne <sho...@gmail.com> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Message-Id: <20170825141940.20740-2-dgilb...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> Tested-by: Stafford Horne <sho...@gmail.com> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 1a2b3ebd1a..9838ccc885 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -166,7 +166,7 @@ void migration_incoming_state_destroy(void) mis->from_src_file = NULL; } - qemu_event_destroy(&mis->main_thread_load_event); + qemu_event_reset(&mis->main_thread_load_event); } static void migrate_generate_event(int new_state) -- 2.13.5