Fix crash in heap allocator when Xen 'zone' is empty.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-03-05 14:39:03 +00:00
1 parent 63d7a82fae
commit c8b9c6c182
1 file changed
+3 -3
+3 -3
View File
@@ -342,8 +342,8 @@ static struct page_info *alloc_heap_pages(
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) )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.