lkml.org 
[lkml]   [2011]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] x86: Fix calculation of size of numa_distance
Fix the calculation of the size of numa_distance array. It is 2-dimemsional
array. This fixes early panics seen on large numa systems.

Signed-off-by: Jack Steiner <steiner@sgi.com>

Index: linux/arch/x86/mm/numa_64.c
===================================================================
--- linux.orig/arch/x86/mm/numa_64.c 2011-02-23 17:46:38.000000000 -0600
+++ linux/arch/x86/mm/numa_64.c 2011-02-25 08:53:45.781921592 -0600
@@ -414,7 +414,8 @@ static int __init numa_alloc_distance(vo

for_each_node_mask(i, nodes_parsed)
cnt = i;
- size = ++cnt * sizeof(numa_distance[0]);
+ cnt++;
+ size = cnt * cnt * sizeof(numa_distance[0]);

phys = memblock_find_in_range(0, (u64)max_pfn_mapped << PAGE_SHIFT,
size, PAGE_SIZE);

\
 
 \ /
  Last update: 2011-02-25 16:01    [W:0.047 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site