[RFC PATCH 02/25] migration: Fix state change at migration_channel_process_incoming

Fabiano Rosas posted 25 patches 1 week, 4 days ago
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Li Zhijian <lizhijian@fujitsu.com>
There is a newer version of this series
[RFC PATCH 02/25] migration: Fix state change at migration_channel_process_incoming
Posted by Fabiano Rosas 1 week, 4 days ago
When the incoming migration fails during the channel connection phase,
the state transition to FAILED is currently being done in the
MigrationState->state, but the MigrationIncomingState->state is the
one that should be used.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 migration/channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/channel.c b/migration/channel.c
index 92435fa7f7..4768c71455 100644
--- a/migration/channel.c
+++ b/migration/channel.c
@@ -48,7 +48,7 @@ void migration_channel_process_incoming(QIOChannel *ioc)
 
     if (local_err) {
         error_report_err(local_err);
-        migrate_set_state(&s->state, s->state, MIGRATION_STATUS_FAILED);
+        migrate_set_state(&mis->state, mis->state, MIGRATION_STATUS_FAILED);
         if (mis->exit_on_error) {
             exit(EXIT_FAILURE);
         }
-- 
2.51.0
Re: [RFC PATCH 02/25] migration: Fix state change at migration_channel_process_incoming
Posted by Peter Xu 1 week, 1 day ago
On Fri, Dec 26, 2025 at 06:19:04PM -0300, Fabiano Rosas wrote:
> When the incoming migration fails during the channel connection phase,
> the state transition to FAILED is currently being done in the
> MigrationState->state, but the MigrationIncomingState->state is the
> one that should be used.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu