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-changelog

[Xen-changelog] [xen-unstable] A correct fix for page_alloc crash when X

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] A correct fix for page_alloc crash when Xen heap empty.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Mar 2007 11:31:12 -0800
Delivery-date: Wed, 07 Mar 2007 12:47:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173260616 0
# Node ID 87f626f1d5f57f504116074698ae7affcd580b9d
# Parent  095a476a96b18c5d93b6b856bffd1f82a977e358
A correct fix for page_alloc crash when Xen heap empty.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/page_alloc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 095a476a96b1 -r 87f626f1d5f5 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Tue Mar 06 16:51:42 2007 +0000
+++ b/xen/common/page_alloc.c   Wed Mar 07 09:43:36 2007 +0000
@@ -342,7 +342,8 @@ static struct page_info *alloc_heap_page
     unsigned int zone_lo, unsigned zone_hi,
     unsigned int cpu, unsigned int order)
 {
-    int i, j, zone, node = cpu_to_node(cpu), num_nodes = num_online_nodes();
+    unsigned int i, j, zone;
+    unsigned int node = cpu_to_node(cpu), num_nodes = num_online_nodes();
     unsigned long request = 1UL << order;
     struct page_info *pg;
 
@@ -362,7 +363,7 @@ static struct page_info *alloc_heap_page
      * needless computation on fast-path */
     for ( i = 0; i < num_nodes; i++ )
     {
-        for ( zone = zone_hi; zone >= zone_lo; --zone )
+        for ( zone = zone_hi; zone-- > zone_lo; )
         {
             /* check if target node can support the allocation */
             if ( avail[node] && (avail[node][zone] >= request) )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] A correct fix for page_alloc crash when Xen heap empty., Xen patchbot-unstable <=