diff options
author | Avihai Horon <avihaih@nvidia.com> | 2024-03-28 16:02:51 +0200 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-03-31 14:30:03 -0400 |
commit | 30158d885008246f48ee8ef9cdeca220c1bd8586 (patch) | |
tree | 1dbc8cf2cff53b3003c49c1e1f6ea07d35b6d8b4 /migration/postcopy-ram.h | |
parent | b9dbf6f9bf533564f6a4277d03906fcd32bb0245 (diff) | |
download | qemu-30158d885008246f48ee8ef9cdeca220c1bd8586.zip qemu-30158d885008246f48ee8ef9cdeca220c1bd8586.tar.gz qemu-30158d885008246f48ee8ef9cdeca220c1bd8586.tar.bz2 |
migration: Set migration error in migration_completion()
After commit 9425ef3f990a ("migration: Use migrate_has_error() in
close_return_path_on_source()"), close_return_path_on_source() assumes
that migration error is set if an error occurs during migration.
This may not be true if migration errors in migration_completion(). For
example, if qemu_savevm_state_complete_precopy() errors, migration error
will not be set.
This in turn, will cause a migration hang bug, similar to the bug that
was fixed by commit 22b04245f0d5 ("migration: Join the return path
thread before releasing to_dst_file"), as shutdown() will not be issued
for the return-path channel.
Fix it by ensuring migration error is set in case of error in
migration_completion().
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Fixes: 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()")
Acked-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240328140252.16756-2-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/postcopy-ram.h')
0 files changed, 0 insertions, 0 deletions