qemu: process: Ensure that 'beingDestroyed' gets cleared only after VM id is reset
commitd9935a5c4fa5b9ca4b25b1b6b31f9391216fdfd0
authorPeter Krempa <pkrempa@redhat.com>
Thu, 6 Jun 2024 15:43:12 +0000 (6 17:43 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 20 Jun 2024 07:58:52 +0000 (20 09:58 +0200)
treec756d01bb61182cfc0f826f5aeff2528bbc7d2ab
parent3865410e7f67ca4ec66e9a905e75f452762a97f0
qemu: process: Ensure that 'beingDestroyed' gets cleared only after VM id is reset

Prevent the possibility that a VM could be considered as alive while
inside qemuProcessStop.

A recently fixed bug which unlocked the domain object while inside
qemuProcessStop showed that there's possibility to confuse the state of
the VM to be considered active while 'qemuProcessStop' is processing
shutdown of the VM. Ensure that this doesn't happen by clearing the
'beingDestroyed' flag only after the VM id is cleared.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_process.c