From: Martin Kletzander Date: Thu, 9 Oct 2014 06:18:33 +0000 (+0200) Subject: qemu: make sure capability probing process can start X-Git-Tag: CVE-2014-7823~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ed1b55b20300e0ea53925349d918935c2114bf2;p=thirdparty%2Flibvirt.git qemu: make sure capability probing process can start When daemon is killed right in the middle of probing a qemu binary for its capabilities, the qemu process is left running. Next time the daemon is starting, it cannot start the probing qemu process because the one that's already running does have the pidfile flock()'d. Reported-by: Wang Yufei Signed-off-by: Martin Kletzander --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b6c0f1b06e..ec6614a68f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3243,6 +3243,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, config.data.nix.path = monpath; config.data.nix.listen = false; + virPidFileForceCleanupPath(pidfile); + VIR_DEBUG("Try to get caps via QMP qemuCaps=%p", qemuCaps); /*