All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xentop: fix sigsegv
@ 2010-05-19 17:55 Jeremy Fitzhardinge
  0 siblings, 0 replies; only message in thread
From: Jeremy Fitzhardinge @ 2010-05-19 17:55 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Xen-devel

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-19 17:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 17:55 [PATCH] xentop: fix sigsegv Jeremy Fitzhardinge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.