From fef285536682842862f3e9cfcedfbcca3b5e8388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 12 Oct 2017 14:55:53 +0200 Subject: [PATCH] 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. --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- GitLab