[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: check for xc_domain_setmaxmem failure in libxl__build_pre
commit aaa1223b7529c4415c6c9627dbf67a71f22f1260 Author: Matthew Daley <mattd@xxxxxxxxxxx> AuthorDate: Tue Dec 3 01:11:43 2013 +1300 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Fri Dec 13 17:22:32 2013 +0000 libxl: check for xc_domain_setmaxmem failure in libxl__build_pre Coverity-ID: 1087115 Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx> Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> --- tools/libxl/libxl_dom.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 078cff1..55f74b2 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -224,7 +224,6 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, * whatever that turns out to be. */ if (libxl_defbool_val(info->numa_placement)) { - if (!libxl_bitmap_is_full(&info->cpumap)) { LOG(ERROR, "Can run NUMA placement only if no vcpu " "affinity is specified"); @@ -238,7 +237,12 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, libxl_domain_set_nodeaffinity(ctx, domid, &info->nodemap); libxl_set_vcpuaffinity_all(ctx, domid, info->max_vcpus, &info->cpumap); - xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb + LIBXL_MAXMEM_CONSTANT); + if (xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb + + LIBXL_MAXMEM_CONSTANT) < 0) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Couldn't set max memory"); + return ERROR_FAIL; + } + xs_domid = xs_read(ctx->xsh, XBT_NULL, "/tool/xenstored/domid", NULL); state->store_domid = xs_domid ? atoi(xs_domid) : 0; free(xs_domid); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |