[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100520.011447.193688848.anemo@mba.ocn.ne.jp>
Date: Thu, 20 May 2010 01:14:47 +0900 (JST)
From: Atsushi Nemoto <anemo@....ocn.ne.jp>
To: mroberto@...i.cetuc.puc-rio.br
Cc: akpm@...ux-foundation.org, kosaki.motohiro@...fujitsu.com,
cl@...ux-foundation.org, mel@....ul.ie, minchan.kim@...il.com,
linux@....linux.org.uk, sfr@...b.auug.org.au, hpa@...or.com,
yinghai@...nel.org, sshtylyov@...sta.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] MM: Fix NR_SECTION_ROOTS == 0 when using using
sparsemem extreme.
On Wed, 5 May 2010 18:02:46 -0300, Marcelo Roberto Jimenez <mroberto@...i.cetuc.puc-rio.br> wrote:
> Got this while compiling for ARM/SA1100:
>
> mm/sparse.c: In function '__section_nr':
> mm/sparse.c:135: warning: 'root' is used uninitialized in this function
>
> This patch follows Russell King's suggestion for a new calculation for
> NR_SECTION_ROOTS. Thanks also to Sergei Shtylyov for pointing out the
> existence of the macro DIV_ROUND_UP.
JFYI, This fix is not just silence the warning, fix a real problem.
Without this fix, mem_section[] might have 0 size so mem_section[0]
will share other variable area. For example, I got:
c030c700 b __warned.16478
c030c700 B mem_section
c030c701 b __warned.16483
This might cause very strange behavior. Your patch actually fixes it.
Thank you.
---
Atsushi Nemoto
--
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