# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173105543 0
# Node ID 7a39b1e22373a6c6ca10db428458cbd38b0b8bb7
# Parent 2963f61b8135dc2eac21b695c90a76a6bf970c44
Fix crash in heap allocator when Xen 'zone' is empty.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/common/page_alloc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -r 2963f61b8135 -r 7a39b1e22373 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c Mon Mar 05 14:20:26 2007 +0000
+++ b/xen/common/page_alloc.c Mon Mar 05 14:39:03 2007 +0000
@@ -342,8 +342,8 @@ static struct page_info *alloc_heap_page
unsigned int zone_lo, unsigned zone_hi,
unsigned int cpu, unsigned int order)
{
- unsigned int i, j, node = cpu_to_node(cpu), num_nodes = num_online_nodes();
- unsigned int zone, request = (1UL << order);
+ int i, j, zone, node = cpu_to_node(cpu), num_nodes = num_online_nodes();
+ unsigned long request = 1UL << order;
struct page_info *pg;
ASSERT(node >= 0);
@@ -426,7 +426,7 @@ static void free_heap_pages(
/* Merge chunks as far as possible. */
while ( order < MAX_ORDER )
{
- mask = 1 << order;
+ mask = 1UL << order;
if ( (page_to_mfn(pg) & mask) )
{
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|