[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] A correct fix for page_alloc crash when Xen heap empty.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.