Skip to content

Commit

Permalink
[S390] Fix vmalloc area size calculation.
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 9, 2007
1 parent 6721f77 commit de338a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit de338a3

Please sign in to comment.