提交 572c5084 编写于 作者: M Michal Privoznik

qemu: Check for user alias collisions in coldplug

https://bugzilla.redhat.com/show_bug.cgi?id=1697676

If an user tries to attach a device with colliding user alias
then we attach it happily and thus leave domain unable to start.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 57eb2936
......@@ -8647,6 +8647,10 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
driver->xmlopt, parse_flags)))
goto cleanup;
if (virDomainDeviceValidateAliasForHotplug(vm, devConf,
VIR_DOMAIN_AFFECT_CONFIG) < 0)
goto cleanup;
if (virDomainDefCompatibleDevice(vmdef, devConf, NULL,
VIR_DOMAIN_DEVICE_ACTION_ATTACH,
false) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册