aboutsummaryrefslogtreecommitdiff
path: root/qapi/qobject-output-visitor.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2019-11-29 12:51:32 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2020-06-22 12:45:29 -0500
commitd306348fd65a57c32e36558f450d90d4ed6a03d9 (patch)
treec7f3ce50cc48944e9ed87c3851b98881375981ac /qapi/qobject-output-visitor.c
parentf3ef98874e2b8ea5656cd7026eaf4e150b228426 (diff)
downloadqemu-d306348fd65a57c32e36558f450d90d4ed6a03d9.zip
qemu-d306348fd65a57c32e36558f450d90d4ed6a03d9.tar.gz
qemu-d306348fd65a57c32e36558f450d90d4ed6a03d9.tar.bz2
runstate: ignore finishmigrate -> prelaunch transition
Commit 1bd71dce4bf2 tries to prevent a finishmigrate -> prelaunch transition by exiting at the beginning of the main_loop_should_exit() function if the state is already finishmigrate. As the finishmigrate state is set in the migration thread it can happen concurrently to the function. The migration thread and the function are normally protected by the iothread mutex and thus the state should no evolve between the start of the function and its end. Unfortunately during the function life the lock is released by pause_all_vcpus() just before the point we need to be sure we are not in finishmigrate state and if the migration thread is waiting for the lock it will take the opportunity to change the state to finishmigrate. The only way to be sure we are not in the finishmigrate state when we need is to check the state after the pause_all_vcpus() function. Fixes: 1bd71dce4bf2 ("runstate: ignore exit request in finish migrate state") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> (cherry picked from commit ddad81bd28de665475a87693a93e6cf5d6fd8bab) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qapi/qobject-output-visitor.c')
0 files changed, 0 insertions, 0 deletions