Mailing List Archive

[xen-unstable] xentop: fix abnormal value cpu(%) when domain shutdown.
# HG changeset patch
# User kfraser@localhost.localdomain
# Date 1186473998 -3600
# Node ID ff2dae3ebb1de85229ef3067a0257316bcc78aab
# Parent 007a11317ce88ce348b620280f87e709ace855ba
xentop: fix abnormal value cpu(%) when domain shutdown.

If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
---
tools/xenstat/libxenstat/src/xenstat.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 007a11317ce8 -r ff2dae3ebb1d tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c Tue Aug 07 09:04:44 2007 +0100
+++ b/tools/xenstat/libxenstat/src/xenstat.c Tue Aug 07 09:06:38 2007 +0100
@@ -677,7 +677,7 @@ static void xenstat_prune_domain(xenstat
/* shift entries following specified entry up by one */
if (entry < node->num_domains) {
xenstat_domain *domain = &node->domains[entry];
- memmove(domain,domain+1,node->num_domains-entry);
+ memmove(domain,domain+1,(node->num_domains - entry) * sizeof(xenstat_domain) );
}

/* zero out original last entry from node -- not

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog