[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: Do not try to destroy domain -1 on failed create



Perhaps since f0c4c53f "libxl: domain create: Do not destroy on ao
abort", we have destroyed guest_domid==-1 if domain creation fails
without actually creating a domid.

Reported-by: Julien Grall <julien.grall@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxxxxx>
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_create.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index f366a09..f799081 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1543,7 +1543,7 @@ static void domcreate_complete(libxl__egc *egc,
     libxl_domain_config_dispose(d_config_saved);
 
     if (!retain_domain) {
-        if (dcs->guest_domid) {
+        if (dcs->guest_domid > 0) {
             dcs->dds.ao = ao;
             dcs->dds.domid = dcs->guest_domid;
             dcs->dds.callback = domcreate_destruction_cb;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.