Skip to contentSkip to conversation

Fix vmalloc area size calculation.

S390 Martin Schwidefsky 1 participant 1 message Jan 7, 2007 s390

lore
Share & tools
lore
#0 lore raw

From: Heiko Carstens <[email protected]>

[S390] Fix vmalloc area size calculation.

setup_memory_end() uses VMALLOC_END instead of VMALLOC_END_INIT to calculate the maximum supported size of physical memory. Since VMALLOC_END is zero, this will cause a crash on 31 bit systems.

---

 arch/s390/kernel/setup.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/setup.c +1 -1
diff -urpN linux-2.6/arch/s390/kernel/setup.c linux-2.6-patched/arch/s390/kernel/setup.c
@@ -476,7 +476,7 @@ static void __init setup_memory_end(void
 	int i;
 
 	memory_size = real_size = 0;
-	max_phys = VMALLOC_END - VMALLOC_MIN_SIZE;
+	max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE;
 	memory_end &= PAGE_MASK;
 
 	max_mem = memory_end ? min(max_phys, memory_end) : max_phys;