[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: fix assertion failure in stub domain creation
commit d00377890a3c62e0e925d171b6b839406b6d134d Author: Paul Durrant <pdurrant@xxxxxxxxxx> AuthorDate: Wed Feb 5 11:24:12 2020 +0000 Commit: Wei Liu <wl@xxxxxxx> CommitDate: Wed Feb 5 11:56:27 2020 +0000 libxl: fix assertion failure in stub domain creation An assertion in libxl__domain_make(): 'soft_reset || *domid == INVALID_DOMID' does not hold true for stub domain creation, where soft_reset is false but the passed in domid == 0. This is easily fixed by changing the initializer in libxl__spawn_stub_dm(). NOTE: The comment for XEN_DOMCTL_createdomain in domctl.h is changed to reflect reality. Fixes: 75259239d85d ("libxl_create: make 'soft reset' explicit") Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Wei Liu <wl@xxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- tools/libxl/libxl_dm.c | 2 +- xen/include/public/domctl.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index f758daf3b6..3b1da90167 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2127,7 +2127,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) goto out; } - sdss->pvqemu.guest_domid = 0; + sdss->pvqemu.guest_domid = INVALID_DOMID; libxl_domain_create_info_init(&dm_config->c_info); dm_config->c_info.type = LIBXL_DOMAIN_TYPE_PV; diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 2bb7397923..fec6f6fdd1 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -42,7 +42,8 @@ /* * NB. xen_domctl.domain is an IN/OUT parameter for this operation. - * If it is specified as zero, an id is auto-allocated and returned. + * If it is specified as an invalid value (0 or >= DOMID_FIRST_RESERVED), + * an id is auto-allocated and returned. */ /* XEN_DOMCTL_createdomain */ struct xen_domctl_createdomain { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |