|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl_dm: Fix initialisation of libxl__stub_dm_spawn_state
commit 4b52653c72ab4afd287e39881604ef7cc5818bd9
Author: Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Fri May 24 17:11:34 2019 +0100
Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CommitDate: Fri Sep 20 10:41:01 2019 +0100
libxl_dm: Fix initialisation of libxl__stub_dm_spawn_state
sdss->pvqemu wasn't initialiased and disposed of properly.
Also, move the initialisation of sdss->xswait with the rest of the
initialisation of sdss.
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/libxl/libxl_dm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 9f60801d04..5fe25b56f5 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -2107,8 +2107,11 @@ void libxl__spawn_stub_dm(libxl__egc *egc,
libxl__stub_dm_spawn_state *sdss)
libxl__domain_build_state *const d_state = sdss->dm.build_state;
libxl__domain_build_state *const stubdom_state = &sdss->dm_state;
+ /* Initialise private part of sdss */
libxl__domain_build_state_init(stubdom_state);
dmss_init(&sdss->dm);
+ dmss_init(&sdss->pvqemu);
+ libxl__xswait_init(&sdss->xswait);
if (guest_config->b_info.device_model_version !=
LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) {
@@ -2393,8 +2396,6 @@ static void stubdom_pvqemu_cb(libxl__egc *egc,
STATE_AO_GC(sdss->dm.spawn.ao);
uint32_t dm_domid = sdss->pvqemu.guest_domid;
- libxl__xswait_init(&sdss->xswait);
-
if (rc) {
LOGED(ERROR, sdss->dm.guest_domid,
"error connecting nics devices");
@@ -2441,6 +2442,7 @@ static void stubdom_xswait_cb(libxl__egc *egc,
libxl__xswait_state *xswait,
libxl__domain_build_state_dispose(&sdss->dm_state);
libxl__xswait_stop(gc, xswait);
dmss_dispose(gc, &sdss->dm);
+ dmss_dispose(gc, &sdss->pvqemu);
sdss->callback(egc, &sdss->dm, rc);
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |