[Xen-changelog] [xen-unstable] xen: Fix dumb boot allocator breakage that prevents loop termination

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Xen-changelog] [xen-unstable] xen: Fix dumb boot allocator breakage that prevents loop termination

Xen patchbot-unstable
# HG changeset patch
# User [hidden email]
# Date 1172241393 0
# Node ID eb3ebf11abfe06232495d5a1d2fc90b1ebafb9e2
# Parent  8bcaedc68f5a0ba773d789f45f7ec578cd7d7c76
xen: Fix dumb boot allocator breakage that prevents loop termination
in some cases. :-)
Signed-off-by: Keir Fraser <[hidden email]>
---
 xen/common/page_alloc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 8bcaedc68f5a -r eb3ebf11abfe xen/common/page_alloc.c
--- a/xen/common/page_alloc.c Fri Feb 23 12:58:20 2007 +0000
+++ b/xen/common/page_alloc.c Fri Feb 23 14:36:33 2007 +0000
@@ -262,9 +262,9 @@ unsigned long alloc_boot_low_pages(
     unsigned long pg, i;
 
     /* Search forwards to obtain lowest available range. */
-    for ( pg = first_valid_mfn & ~(pfn_align-1);
-          (pg + nr_pfns) < max_page;
-          pg = (pg + i + pfn_align - 1) & ~(pfn_align - 1) )
+    for ( pg = first_valid_mfn & ~(pfn_align - 1);
+          (pg + nr_pfns) <= max_page;
+          pg = (pg + i + pfn_align) & ~(pfn_align - 1) )
     {
         for ( i = 0; i < nr_pfns; i++ )
             if ( allocated_in_map(pg+i) )

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog