lkml.org 
[lkml]   [2011]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/14] x86-32, NUMA: Fix failure condition check in alloc_remap()
On 04/04/2011 03:23 PM, Tejun Heo wrote:
> node_remap_{start|end}_vaddr[] describe [start, end) ranges; however,
> alloc_remap() incorrectly failed when the current allocation + size
> equaled the end but it should fail only when it goes over. Fix it.
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Cc: Yinghai Lu<yinghai@kernel.org>
> Cc: David Rientjes<rientjes@google.com>
> Cc: Thomas Gleixner<tglx@linutronix.de
> Cc: Ingo Molnar<mingo@redhat.com>
> Cc: "H. Peter Anvin"<hpa@zytor.com>
> ---
> arch/x86/mm/numa_32.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
> index bde3906..84aac47 100644
> --- a/arch/x86/mm/numa_32.c
> +++ b/arch/x86/mm/numa_32.c
> @@ -200,7 +200,7 @@ void *alloc_remap(int nid, unsigned long size)
>
> size = ALIGN(size, L1_CACHE_BYTES);
>
> - if (!allocation || (allocation + size)>= node_remap_end_vaddr[nid])
> + if (!allocation || (allocation + size)> node_remap_end_vaddr[nid])
> return NULL;
>
> node_remap_alloc_vaddr[nid] += size;

Acked-by: Yinghai Lu <yinghai@kernel.org>


\
 
 \ /
  Last update: 2011-04-05 19:23    [from the cache]
©2003-2011 Jasper Spaans