Re: [patch] mm: sparsemem memory_present() memory corruption fix

From: KAMEZAWA Hiroyuki
Date: Tue Apr 15 2008 - 21:45:34 EST



I'm sorry to be too late here..

On Wed, 16 Apr 2008 02:03:56 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:

> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
> ---
> mm/sparse.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> Index: linux/mm/sparse.c
> ===================================================================
> --- linux.orig/mm/sparse.c
> +++ linux/mm/sparse.c
> @@ -149,8 +149,18 @@ static inline int sparse_early_nid(struc
> /* Record a memory area against a node. */
> void __init memory_present(int nid, unsigned long start, unsigned long end)
> {
> + unsigned long max_arch_pfn = 1ULL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
> unsigned long pfn;
>
how about

max_arch_pfn = NR_MEM_SECTIONS * PAGES_PER_SECTION.

?
Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/