Re: [PATCH] qemu: Avoid parsing empty nodeset string

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

 



On Wed, Jun 14, 2017 at 21:02:19 +0530, Nitesh Konkar wrote:
> The advisory nodeset from numad is parsed irrespective of
> the string being empty or not. Avoid parsing an empty nodeset
> string.
> 
> Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 85b800d..1c49fa6 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -5456,7 +5456,7 @@ qemuProcessPrepareDomain(virConnectPtr conn,
>          if (virDomainDefNeedsPlacementAdvice(vm->def)) {
>              nodeset = virNumaGetAutoPlacementAdvice(virDomainDefGetVcpus(vm->def),
>                                                      virDomainDefGetMemoryTotal(vm->def));
> -            if (!nodeset)
> +            if (virStringIsEmpty(nodeset))
>                  goto cleanup;
>  
>              VIR_DEBUG("Nodeset returned from numad: %s", nodeset);

virNumaGetAutoPlacementAdvice returns NULL on error, any other value is
considered success. Thus this change could cause a jump to the cleanup
label and returning error from qemuProcessPrepareDomain without setting
any error.

NACK

Jirka

--
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]
  Powered by Linux