WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH]Fix a memory allocation bug in MCA

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH]Fix a memory allocation bug in MCA
From: SUZUKI Kazuhiro <kaz@xxxxxxxxxxxxxx>
Date: Thu, 12 Jul 2007 12:48:27 +0900 (JST)
Delivery-date: Wed, 11 Jul 2007 20:46:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,

   I found a bug of memory allocation for MCA error logs.
The following patch fixes it.

Thanks,
KAZ

Signed-off-by: Kazuhiro Suzuki <kaz@xxxxxxxxxxxxxx>

--- xen/arch/ia64/linux-xen/mca.c.orig  2007-07-11 17:33:03.000000000 +0900
+++ xen/arch/ia64/linux-xen/mca.c       2007-07-12 11:50:39.000000000 +0900
@@ -184,7 +184,7 @@
 #define IA64_LOG_ALLOCATE(it, size) \
        do { \
                unsigned int pageorder; \
-               pageorder  = get_order_from_bytes(sizeof(struct ia64_mca_cpu)); 
\
+               pageorder  = get_order_from_bytes(size); \
                ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
                  (ia64_err_rec_t *)alloc_xenheap_pages(pageorder); \
                ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>