Re: [PATCH] libxl: fix AttachDeviceConfig on hostdev type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.09.2015 07:15, Chunyan Liu wrote:
> After attach-device a <hostdev> with --config, new device doesn't
> show up in dumpxml and in guest.
> 
> To fix that, set dev->data.hostdev = NULL after work so that the
> pointer is not freed, since vmdef has the pointer and still need it.
> 
> Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
> ---
>  src/libxl/libxl_driver.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index e2797d5..8087c27 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -3312,6 +3312,7 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
>  
>              if (virDomainHostdevInsert(vmdef, hostdev) < 0)
>                  return -1;
> +            dev->data.hostdev = NULL;
>              break;
>  
>          default:
> 

Just so that the process is obeyed, ACK. Jim already pushed this.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]