mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
libs/light: Propagate libxl__arch_domain_create() return code
Commit34990446castarted 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:34990446ca("libxl: don't ignore the return value from xc_cpuid_apply_policy") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Release-acked-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
1 parent
57f07cca82
commit
8cdfbf95b1
1 file changed
+2
@@ -377,6 +377,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
|
||||
@@ -384,6 +385,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;
|
||||
}
|
||||
|
||||
|
||||