[libvirt] [PATCH] qemu: fix not end the job after use OpenGraphics(FD) and get fail when exit monitor
Martin Kletzander
mkletzan at redhat.com
Wed Jul 1 06:15:05 UTC 2015
On Tue, Jun 30, 2015 at 11:35:13AM +0800, Luyao Huang wrote:
>If guest unexpect exit(qemu process be killed) and get failed when
>exit the monitor, guest job still handled by old function, this will
>make guest cannot start later.
>Need call qemuDomainObjEndJob to release job status before unref vm.
>
>Signed-off-by: Luyao Huang <lhuang at redhat.com>
>---
ACK and safe for freeze. I'll push it in a while with modified commit
message.
> src/qemu/qemu_driver.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index 2b530c8..b1c9f08 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -17255,10 +17255,8 @@ qemuDomainOpenGraphics(virDomainPtr dom,
> qemuDomainObjEnterMonitor(driver, vm);
> ret = qemuMonitorOpenGraphics(priv->mon, protocol, fd, "graphicsfd",
> (flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH) != 0);
>- if (qemuDomainObjExitMonitor(driver, vm) < 0) {
>+ if (qemuDomainObjExitMonitor(driver, vm) < 0)
> ret = -1;
>- goto cleanup;
>- }
> qemuDomainObjEndJob(driver, vm);
>
> cleanup:
>@@ -17327,10 +17325,8 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom,
> qemuDomainObjEnterMonitor(driver, vm);
> ret = qemuMonitorOpenGraphics(priv->mon, protocol, pair[1], "graphicsfd",
> (flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH));
>- if (qemuDomainObjExitMonitor(driver, vm) < 0) {
>+ if (qemuDomainObjExitMonitor(driver, vm) < 0)
> ret = -1;
>- goto cleanup;
>- }
> qemuDomainObjEndJob(driver, vm);
> if (ret < 0)
> goto cleanup;
>--
>1.8.3.1
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150701/3738aa41/attachment-0001.sig>
More information about the libvir-list
mailing list