]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Postcopy: Reset state to avoid cleanup assert
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 2 Feb 2017 15:59:08 +0000 (15:59 +0000)
committerJuan Quintela <quintela@redhat.com>
Mon, 6 Feb 2017 12:36:49 +0000 (13:36 +0100)
On a destination host with no userfault support an incoming
postcopy would cause the state to enter ADVISE before
it realised there was no support, and because it was in ADVISE
state it would perform a cleanup at the end.  Since there
was no support the cleanup function should be unreachable,
but ends up being called and asserting.

Reset the state when we realise we have no support, thus the
cleanup doesn't happen.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20170202155909.31784-2-dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/savevm.c

index 8b8c74dc8683ee10a153c1301c229cef5de4bf1e..01997687c4c5a9d2513cad430c596489cbfbb52b 100644 (file)
@@ -1355,6 +1355,7 @@ static int loadvm_postcopy_handle_advise(MigrationIncomingState *mis)
     }
 
     if (!postcopy_ram_supported_by_host()) {
+        postcopy_state_set(POSTCOPY_INCOMING_NONE);
         return -1;
     }