lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] mm/memblock: fix overlapping allocation when doubling reserved array
Hello, Greg.

Tricky one. Nice catch.

> diff --git a/mm/memblock.c b/mm/memblock.c
> index 952123e..3a61e74 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -184,7 +184,9 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u
> }
> }
>
> -static int __init_memblock memblock_double_array(struct memblock_type *type)
> +static int __init_memblock memblock_double_array(struct memblock_type *type,
> + phys_addr_t exclude_start,
> + phys_addr_t exclude_size)

I find @exclude_start and size a bit misleading mostly because
memblock_double_array() would then proceed to ignore the specified
area. Wouldn't it be better to use names which signify that they're
the reason why the array is being doubled instead? e.g. sth like
@new_area_start, @new_area_size. Can you please also add /** function
comment explaning the subtlety?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-06-18 22:21    [W:0.028 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site