xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxl: initialize domid to 0 in libxl__create_stubdom
@ 2011-06-09  5:03 Wei Liu
  2011-06-09  7:55 ` Ian Campbell
  0 siblings, 1 reply; 19+ messages in thread
From: Wei Liu @ 2011-06-09  5:03 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Ian Campbell, Stefano Stabellini

The uninitialized domid may cause libxl__domain_make to fail.

In libxl__domain_make:
assert(!libxl_domid_valid_guest(*domid)).

Signed-off-by: Wei Liu <liuw@liuw.name>

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 47a51c8..fbee1d0 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -570,7 +570,7 @@ static int libxl__create_stubdom(libxl__gc *gc,
     libxl_domain_create_info c_info;
     libxl_domain_build_info b_info;
     libxl__domain_build_state state;
-    uint32_t domid;
+    uint32_t domid = 0;
     char **args;
     struct xs_permissions perm[2];
     xs_transaction_t t;

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-06-24 14:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09  5:03 [PATCH] libxl: initialize domid to 0 in libxl__create_stubdom Wei Liu
2011-06-09  7:55 ` Ian Campbell
2011-06-09  8:31   ` Wei Liu
2011-06-09 10:23     ` Ian Campbell
2011-06-09 11:03       ` Wei Liu
2011-06-09 11:35         ` Ian Campbell
2011-06-09 14:41       ` Stefano Stabellini
2011-06-09 14:43         ` Ian Campbell
2011-06-17 17:46       ` Ian Jackson
2011-06-20 19:06         ` Stefano Stabellini
2011-06-21  3:29           ` ZhouPeng
2011-06-21  7:31             ` ZhouPeng
2011-06-21 12:28             ` Ian Jackson
2011-06-21 13:31               ` ZhouPeng
2011-06-21 12:25           ` Ian Jackson
2011-06-21 14:05             ` Stefano Stabellini
2011-06-21 14:25               ` Ian Jackson
2011-06-22 17:59                 ` Stefano Stabellini
2011-06-24 14:37                   ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).