From: Ján Tomko Date: Thu, 12 Oct 2017 12:55:53 +0000 (+0200) Subject: qemuDomainAttachRNGDevice: do not access source.file randomly X-Git-Tag: v3.9.0-rc1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fef285536682842862f3e9cfcedfbcca3b5e8388;p=thirdparty%2Flibvirt.git qemuDomainAttachRNGDevice: do not access source.file randomly We pass the source.file to qemuCheckCCWS390AddressSupport for the purpose of reporting an error message without actually checking that the rng device is of type VIR_DOMAIN_RNG_BACKEND_RANDOM. Change it to a hardcoded "rng" string, which also avoids referring to the device by a host-side attribute. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 2d13c28913..1e7931a84a 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2159,7 +2159,7 @@ qemuDomainAttachRNGDevice(virConnectPtr conn, } } else { if (!qemuCheckCCWS390AddressSupport(vm->def, rng->info, priv->qemuCaps, - rng->source.file)) + "rng")) goto cleanup; }