[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.16] libs/light: Propagate libxl__arch_domain_create() return code
commit 4320b31106efe4cf78867e1da379f7534e1c5c34 Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Mon Nov 28 11:46:53 2022 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Nov 28 11:46:53 2022 +0100 libs/light: Propagate libxl__arch_domain_create() return code Commit 34990446ca91 started to overwrite the `rc` value from libxl__arch_domain_create(), thus error aren't propagated anymore. Check `rc` value before doing the next thing. Fixes: 34990446ca91 ("libxl: don't ignore the return value from xc_cpuid_apply_policy") Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> master commit: 8cdfbf95b19c01fbb741c41d5ea5a94f8823964c master date: 2022-11-21 12:23:01 +0100 --- tools/libs/light/libxl_dom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index fe9f760f71..73fccd9243 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -379,6 +379,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, state->console_domid); rc = libxl__arch_domain_create(gc, d_config, state, domid); + if (rc) goto out; /* Construct a CPUID policy, but only for brand new domains. Domains * being migrated-in/restored have CPUID handled during the @@ -386,6 +387,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, if (!state->restore) rc = libxl__cpuid_legacy(ctx, domid, false, info); +out: return rc; } -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.16
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |