|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Prevent xl save from segfaulting when control/shutdown key is removed
# HG changeset patch
# User Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1322041530 0
# Node ID 3341e3e990568f459ae984cd9d2cac2d546eaa4e
# Parent 0a0c02a616768bfab16c072788cb76be1893c37f
Prevent xl save from segfaulting when control/shutdown key is removed
To acknowledge the tools' setting of control/shutdown it is normal for PV
drivers
to rm the key. This leads to libxl__xs_read() returning NULL and thus a
subsequent
strcmp on the return value will cause a segfault.
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
diff -r 0a0c02a61676 -r 3341e3e99056 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c Mon Nov 21 21:28:34 2011 +0000
+++ b/tools/libxl/libxl_dom.c Wed Nov 23 09:45:30 2011 +0000
@@ -444,6 +444,7 @@ static int libxl__domain_suspend_common_
usleep(100000);
state = libxl__xs_read(si->gc, XBT_NULL, path);
+ if (!state) state = "";
watchdog--;
}
@@ -463,6 +464,7 @@ static int libxl__domain_suspend_common_
t = xs_transaction_start(ctx->xsh);
state = libxl__xs_read(si->gc, t, path);
+ if (!state) state = "";
if (!strcmp(state, "suspend"))
libxl__xs_write(si->gc, t, path, "");
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |