[PATCH v4 17/19] ARM: LPAE: mark memory banks with start > ULONG_MAX as highmem
Russell King - ARM Linux
linux at arm.linux.org.uk
Sat Feb 12 05:36:50 EST 2011
On Mon, Jan 24, 2011 at 05:55:59PM +0000, Catalin Marinas wrote:
> @@ -782,7 +782,8 @@ static void __init sanity_check_meminfo(void)
>
> #ifdef CONFIG_HIGHMEM
> if (__va(bank->start) > vmalloc_min ||
> - __va(bank->start) < (void *)PAGE_OFFSET)
> + __va(bank->start) < (void *)PAGE_OFFSET ||
> + bank->start > ULONG_MAX)
I think this check should be first, so that we don't try to evaluate __va()
on phys addresses > ULONG_MAX, possibly resulting in truncation.
More information about the linux-arm-kernel
mailing list