|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: Prevent xl save from segfaulting when control/shutdown key is removed
# HG changeset patch
# User Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1322049817 0
# Node ID 84b3e46aa7d24a4605c36940606e7da9679b0e7f
# Parent 7aa5838499d15555a4c2c6bde0c084762abe0195
libxl: 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>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
diff -r 7aa5838499d1 -r 84b3e46aa7d2 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c Wed Nov 23 11:15:31 2011 +0000
+++ b/tools/libxl/libxl_dom.c Wed Nov 23 12:03:37 2011 +0000
@@ -444,6 +444,7 @@
usleep(100000);
state = libxl__xs_read(si->gc, XBT_NULL, path);
+ if (!state) state = "";
watchdog--;
}
@@ -463,6 +464,7 @@
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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |