mirror of https://gitee.com/openkylin/libvirt.git
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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
57eb2936f3
commit
572c50849c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue