From: John Ferlan Date: Mon, 15 Sep 2014 23:57:22 +0000 (-0400) Subject: qemu: Fix iothreads issue X-Git-Tag: CVE-2014-3633~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b66c950fb9d5dc0e786cdf4ebe7e206cd5d7001c;p=thirdparty%2Flibvirt.git qemu: Fix iothreads issue If there are no iothreads, then return from qemuProcessDetectIOThreadPIDs without error; otherwise, the following occurs: error: Failed to start domain $dom error: An error occurred, but the cause is unknown --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6c412dbff0..a2efdcaad9 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2110,9 +2110,13 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, goto cleanup; niothreads = qemuMonitorGetIOThreads(priv->mon, &iothreads); qemuDomainObjExitMonitor(driver, vm); - if (niothreads <= 0) + if (niothreads < 0) goto cleanup; + /* Nothing to do */ + if (niothreads == 0) + return 0; + if (niothreads != vm->def->iothreads) { virReportError(VIR_ERR_INTERNAL_ERROR, _("got wrong number of IOThread pids from QEMU monitor. "