From: Andrew Morton <akpm@linux-foundation.org>
To: Wang Sheng-Hui <shhuiw@gmail.com>
Cc: yinghai@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] cleanup: convert the int cnt to unsigned long in mm/memblock.c
Date: Tue, 22 Nov 2011 15:59:01 -0800 [thread overview]
Message-ID: <20111122155901.e7b23dce.akpm@linux-foundation.org> (raw)
In-Reply-To: <4EBA0D3D.1090808@gmail.com>
On Wed, 09 Nov 2011 13:18:53 +0800
Wang Sheng-Hui <shhuiw@gmail.com> wrote:
> @@ -111,7 +112,7 @@ static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_
> static phys_addr_t __init_memblock memblock_find_base(phys_addr_t size,
> phys_addr_t align, phys_addr_t start, phys_addr_t end)
> {
> - long i;
> + unsigned long i;
>
> BUG_ON(0 == size);
This change to memblock_find_base() can cause this loop:
for (i = memblock.memory.cnt - 1; i >= 0; i--) {
to become infinite under some circumstances.
I stopped reading at that point. Changes like this require much care.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-11-22 23:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 2:01 [PATCH 2/2] cleanup: convert the int cnt to unsigned long in mm/memblock.c Wang Sheng-Hui
2011-11-09 5:18 ` Wang Sheng-Hui
2011-11-22 23:59 ` Andrew Morton [this message]
2011-11-23 13:01 ` Wang Sheng-Hui
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=20111122155901.e7b23dce.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shhuiw@gmail.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;
as well as URLs for NNTP newsgroup(s).