From: Matthew Daley Date: Fri, 1 Nov 2013 00:29:21 +0000 (+1300) Subject: libxl: check for xc_domain_max_vcpus failure in libxl__build_pre X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6084 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2bb02b31fc1e5e23bd9e4ad5e1f800a704f3d6ae;p=xen.git libxl: check for xc_domain_max_vcpus failure in libxl__build_pre Coverity-ID: 1055047 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 1873459a2e..c164469a07 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -209,7 +209,10 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, char *xs_domid, *con_domid; int rc; - xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus); + if (xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus) != 0) { + LOG(ERROR, "Couldn't set max vcpu count"); + return ERROR_FAIL; + } /* * Check if the domain has any CPU affinity. If not, try to build