Commit 4130cb8e authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] m68k: MM off-by-one

Fix off-by-one error in zone size calculation (from Didier Mequignon and Petr
Stehlik)
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b68e9d40
...@@ -258,7 +258,7 @@ void __init paging_init(void) ...@@ -258,7 +258,7 @@ void __init paging_init(void)
printk ("before free_area_init\n"); printk ("before free_area_init\n");
#endif #endif
zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ? zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ?
mach_max_dma_address : (unsigned long)high_memory); (mach_max_dma_address+1) : (unsigned long)high_memory);
zones_size[1] = (unsigned long)high_memory - zones_size[0]; zones_size[1] = (unsigned long)high_memory - zones_size[0];
zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT; zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment