[libvirt] [PATCH 4/4] qemu: Check for user alias collisions in coldplug

Peter Krempa pkrempa at redhat.com
Mon Apr 29 06:56:48 UTC 2019


On Fri, Apr 26, 2019 at 15:52:23 +0200, Michal Privoznik wrote:
> 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 at redhat.com>
> ---
>  src/qemu/qemu_driver.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 40fd8b9d2d..c072bed1ce 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -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,

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190429/52d0c29b/attachment-0001.sig>


More information about the libvir-list mailing list