[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH for-4.17] libs/light: Propagate libxl__arch_domain_create() return code
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Fri, 18 Nov 2022 16:52:35 +0000
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Henry Wang <Henry.Wang@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Fri, 18 Nov 2022 16:53:07 +0000
- Ironport-data: A9a23:qDwk46lLDhnkXmm5lNwq1sDo5gyWJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJLXWzVbKuINmCnLdtwaImz8BtQvp7TyYdmSVdorik1FyMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icf3grHmeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7aqaVA8w5ARkP6kS5Q+GzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 foJJiEqRU6EvcKJ8oq5e8B329x/dNa+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsfYT/7C7pn9AusrnD5bz1frkPTvact6nLf5AdwzKLsIJzefdniqcB9zhrB9 jOdpziR7hcyboOT+R+M4HiW1vLBk2D0AqkRCr7oz6s/6LGU7jNKU0BHPbehmtGmjmauVtQZL FYbkgIsorI171eDVcTmUluzp3vslg4RXZ9cHvM37CmJy7HI+ECJC24cVDlDZdc68sgsSlQC9 lKPhcKvOjVpv5WcU3fb/bCRxQ5eIgBMczVEP3VdC1JYvZ+z++nfky4jUP5lAaCkqfarHgvQ/ AKyrhkXnOgL0ZYUgvDTEU/8vxqgoZ3ATwgQ7wrRX3644g4RWLNJd7BE+nCAs68ecd/xok2p+ SFdxpPAtLxm4YSlznTlfQkbIF2+Cx9p2hX4iEUnIZQu/i/FF5WLLdEJu2EWyKuE3685ld7Vj K374105CHx7ZiHCgUpLj2WZVawXIVDIT4iNaxwtRoMmj1gYXFbvENtSTUCRxXvxt0MnjLsyP 5yWGe71UyhKVv46kWfsGb5FuVPO+szY7TmLLXwc5032uYdymVbPEetVWLdwRr9RAFy4TPX9r I8EapriJ+R3W+zieCjHmbP/3nhTRUXWxPne9aRqSwJ0ClA7QT54UKeOn+5Jlk4Mt/09q9okN 0qVAidwoGcTT1WeQelWQhiPsI/SYKs=
- Ironport-hdrordr: A9a23:LI5eY6xi1bUE00zMAEIBKrPwJr1zdoMgy1knxilNoRw8SKOlfq eV7ZEmPH7P+VEssR4b+OxoVJPsfZq+z+8W3WByB9eftWDd0QPCRr2KhbGSpwEIcBeRygcy78 tdmtBFeb7NMWQ=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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>
---
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 b59bbe00bb..fa5c79e4f6 100644
--- a/tools/libs/light/libxl_dom.c
+++ b/tools/libs/light/libxl_dom.c
@@ -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;
}
--
Anthony PERARD
|