linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
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: Wed, 23 Nov 2011 21:01:28 +0800	[thread overview]
Message-ID: <4ECCEEA8.3030002@gmail.com> (raw)
In-Reply-To: <20111122155901.e7b23dce.akpm@linux-foundation.org>

On 2011a1'11ae??23ae?JPY 07:59, Andrew Morton wrote:
> 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.
> 

Got it.

Thanks for your instructions. 
I'll review the code and may resubmit the right patches later.

--
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>

      reply	other threads:[~2011-11-23 13:02 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
2011-11-23 13:01     ` Wang Sheng-Hui [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=4ECCEEA8.3030002@gmail.com \
    --to=shhuiw@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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).