mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 22:00:58 +00:00
migration/savevm.c: reorder usage and assertion of mis->from_src_file
Reorder the code so the assertion of mis->from_src_file occurs before
the call to migration_ioc_unregister_yank_from_file, which dereferences
it in qemu_file_get_ioc.
Fixes: 39675ffffb ("migration: Move the yank unregister of channel_close out")
Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Michael Tokarev
parent
fff352b9b6
commit
455c908278
@@ -2875,13 +2875,14 @@ static bool postcopy_pause_incoming(MigrationIncomingState *mis)
|
||||
|
||||
assert(migrate_postcopy_ram());
|
||||
|
||||
assert(mis->from_src_file);
|
||||
|
||||
/*
|
||||
* Unregister yank with either from/to src would work, since ioc behind it
|
||||
* is the same
|
||||
*/
|
||||
migration_ioc_unregister_yank_from_file(mis->from_src_file);
|
||||
|
||||
assert(mis->from_src_file);
|
||||
qemu_file_shutdown(mis->from_src_file);
|
||||
qemu_fclose(mis->from_src_file);
|
||||
mis->from_src_file = NULL;
|
||||
|
||||
Reference in New Issue
Block a user