From: "Jan Beulich" Subject: [PATCH] fix loop boundary of TYPE_ARRAY performance counters Date: Tue, 02 May 2006 16:10:57 +0200 Message-ID: <44578491.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part72576C61.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part72576C61.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Apparently a cut-and-paste like bug. Signed-off-by: Jan Beulich --=__Part72576C61.0__= Content-Type: text/plain; name="xen-perfc-array-bounds.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-perfc-array-bounds.patch" --- 2006-04-27/xen/common/perfc.c.0 2006-04-06 17:50:26.000000000 +0200 +++ 2006-04-27/xen/common/perfc.c 2006-05-02 15:49:42.000000000 +0200 @@ -116,7 +122,7 @@ void perfc_reset(unsigned char key) counters += NR_CPUS; break; case TYPE_ARRAY: - for ( j = 0; j < NR_CPUS; j++ ) + for ( j = 0; j < perfc_info[i].nr_elements; j++ ) atomic_set(&counters[j],0); case TYPE_S_ARRAY: counters += perfc_info[i].nr_elements; --=__Part72576C61.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part72576C61.0__=--