lkml.org 
[lkml]   [2011]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] cleanup: convert the int cnt to unsigned long in mm/memblock.c
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.



\
 
 \ /
  Last update: 2011-11-23 01:01    [W:0.484 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site