qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 1/3] migration: allow calling migration_shutdown without a pr


From: Paolo Bonzini
Subject: [RFC PATCH 1/3] migration: allow calling migration_shutdown without a prior initialization
Date: Tue, 8 Feb 2022 09:44:56 -0500

This can happen with the qemu-qmp binaries.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 migration/migration.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/migration/migration.c b/migration/migration.c
index bcc385b94b..075b21d9b5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -226,6 +226,10 @@ void migration_cancel(const Error *error)
 
 void migration_shutdown(void)
 {
+    if (!current_migration) {
+        return;
+    }
+
     /*
      * When the QEMU main thread exit, the COLO thread
      * may wait a semaphore. So, we should wakeup the
-- 
2.31.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]