linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: mroberto@cpti.cetuc.puc-rio.br
Cc: akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	cl@linux-foundation.org, mel@csn.ul.ie, minchan.kim@gmail.com,
	linux@arm.linux.org.uk, sfr@canb.auug.org.au, hpa@zytor.com,
	yinghai@kernel.org, sshtylyov@mvista.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] MM: Fix NR_SECTION_ROOTS == 0 when using using sparsemem extreme.
Date: Thu, 20 May 2010 01:14:47 +0900 (JST)	[thread overview]
Message-ID: <20100520.011447.193688848.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <n2pcecb6d8f1005051519ze48b22a0t8548311839f510b0@mail.gmail.com> <1273093366-3388-1-git-send-email-mroberto@cpti.cetuc.puc-rio.br>

On Wed,  5 May 2010 18:02:46 -0300, Marcelo Roberto Jimenez <mroberto@cpti.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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2010-05-19 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 21:02 Marcelo Roberto Jimenez
2010-05-05 22:19 ` Marcelo Jimenez
2010-05-19 16:14   ` Atsushi Nemoto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100520.011447.193688848.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=mroberto@cpti.cetuc.puc-rio.br \
    --cc=sfr@canb.auug.org.au \
    --cc=sshtylyov@mvista.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox