On my system, I''m getting SIGSEGVs in xentop because
xenstat_node_domain()
is returning NULL. Skip the loop if it does rather than crashing.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
diff -r 9dda78d7af3b -r 5895ad758076
tools/xenstat/libxenstat/src/xenstat_linux.c
--- a/tools/xenstat/libxenstat/src/xenstat_linux.c Tue May 18 15:38:36 2010
-0700
+++ b/tools/xenstat/libxenstat/src/xenstat_linux.c Wed May 19 10:53:58 2010
-0700
@@ -294,7 +294,7 @@
/* likely using bonding so we alter the configuration for dom0 to have bridge
stats */
if ((strstr(iface, devBridge) != NULL) && (strstr(iface, devNoBridge)
== NULL)) {
domain = xenstat_node_domain(node, 0);
- for (i = 0; i < domain->num_networks; i++) {
+ for (i = 0; domain && i < domain->num_networks; i++) {
if ((domain->networks[i].id == 0) &&
(domain->networks[i].tbytes == 0)
&& (domain->networks[i].rbytes == 0)) {
domain->networks[i].tbytes = txBytes;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel