[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110212103650.GE15616@n2100.arm.linux.org.uk>
Date: Sat, 12 Feb 2011 10:36:50 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v4 17/19] ARM: LPAE: mark memory banks with start >
ULONG_MAX as highmem
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists