Re: [PATCH] nodeinfo: Check for errors when reading core_id

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

 



On Thu, Jul 23, 2015 at 11:47:05 +0200, Andrea Bolognani wrote:

This was introduced in my commit
80533ca25d809a2a3e81266a0acabf61a0f86ced but actually made prominent by
the last refactor of yours.

> ---
>  src/nodeinfo.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/nodeinfo.c b/src/nodeinfo.c
> index fb932c8..ba633a1 100644
> --- a/src/nodeinfo.c
> +++ b/src/nodeinfo.c
> @@ -512,7 +512,9 @@ virNodeParseNode(const char *node,
>              /* logical cpu is equivalent to a core on s390 */
>              core = cpu;
>          } else {
> -            core = virNodeGetCpuValue(node, cpu, "topology/core_id", 0);
> +            if ((core = virNodeGetCpuValue(node, cpu,
> +                                           "topology/core_id", 0)) < 0)
> +                goto cleanup;
>          }
>          if (core > ID_MAX) {
>              virReportError(VIR_ERR_INTERNAL_ERROR,

ACK I'll push this patch in a while.

Peter

Attachment: signature.asc
Description: Digital signature

--
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]