All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: [Xen-devel] [PATCH 07/15] libxl_dm: Fix initialisation of libxl__stub_dm_spawn_state
Date: Fri, 14 Jun 2019 12:24:36 +0100	[thread overview]
Message-ID: <20190614112444.29980-8-anthony.perard@citrix.com> (raw)
In-Reply-To: <20190614112444.29980-1-anthony.perard@citrix.com>

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@citrix.com>
---
 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 348c3fddf5..5942e70c16 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -2105,8 +2105,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) {
@@ -2391,8 +2394,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");
@@ -2439,6 +2440,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);
 }
 
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-06-14 11:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:24 [Xen-devel] [PATCH 00/15] Some cleanup of libxl Anthony PERARD
2019-06-14 11:24 ` [Xen-devel] [PATCH 01/15] libxl: Rename struct libxl_device_type to libxl__device_type Anthony PERARD
2019-09-17 16:28   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 02/15] libxl: Remove unused variable in libxl__device_pci_add_xenstore Anthony PERARD
2019-09-17 16:31   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 03/15] libxl_pci: Make libxl__create_pci_backend static Anthony PERARD
2019-09-17 16:40   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 04/15] libxl_pci: Constify arg `pcidev' of libxl__device_pci_add_xenstore Anthony PERARD
2019-09-17 16:41   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 05/15] libxl_pci: `starting' is a bool Anthony PERARD
2019-09-17 16:41   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 06/15] libxl_dom_save: Reorder functions for switch_qemu_logdirty Anthony PERARD
2019-09-17 16:41   ` Ian Jackson
2019-06-14 11:24 ` Anthony PERARD [this message]
2019-09-17 16:42   ` [Xen-devel] [PATCH 07/15] libxl_dm: Fix initialisation of libxl__stub_dm_spawn_state Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 08/15] libxl: Comment libxl__dm_spawn_state aboud init and dispose Anthony PERARD
2019-09-17 16:42   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 09/15] libxl_domain: Cleanup libxl__destroy_domid Anthony PERARD
2019-09-17 16:42   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 10/15] libxl_usb: Use proper domid value, from libxl__device Anthony PERARD
2019-09-17 16:43   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 11/15] libxl_usb: Fix wrong usage of asserts Anthony PERARD
2019-09-17 16:44   ` Ian Jackson
2019-09-18 10:17     ` Anthony PERARD
2019-09-18 10:39       ` Ian Jackson
2019-09-19 10:03         ` [Xen-devel] [PATCH v2 " Anthony PERARD
2019-09-19 11:21           ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 12/15] libxl_usb: Fix libxl_device_usbctrl_getinfo Anthony PERARD
2019-09-17 16:44   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 13/15] libxl: Constify libxl_device_* param of *_getinfo Anthony PERARD
2019-09-17 16:45   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 14/15] libxl_usb: usbctrl, make use of generic device handling functions Anthony PERARD
2019-09-17 16:46   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 15/15] libxl_usb: Use usbctrl instead of usbctrlinfo Anthony PERARD
2019-09-17 16:46   ` Ian Jackson
2019-09-19 17:07 ` [Xen-devel] [PATCH 00/15] Some cleanup of libxl Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190614112444.29980-8-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.