mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: blockjob: Fix deadlock when terminating job with invalid data
We must exit the monitor prior to refusing other work, otherwise the VM object will become unusable. This bug was introduced in commit v5.5.0-244-gc412383796 but thankfully the code path was not excercised without QEMU_CAPS_BLOCKDEV. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
ccde9ca1f4
commit
8622498f6e
@ -1305,14 +1305,14 @@ qemuBlockJobEventProcessConcluded(qemuBlockJobDataPtr job,
|
||||
dismissed = true;
|
||||
}
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (job->invalidData) {
|
||||
VIR_WARN("terminating job '%s' with invalid data", job->name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
||||
goto cleanup;
|
||||
|
||||
if ((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED ||
|
||||
job->newstate == QEMU_BLOCKJOB_STATE_FAILED) &&
|
||||
job->state == QEMU_BLOCKJOB_STATE_ABORTING)
|
||||
|
Loading…
x
Reference in New Issue
Block a user