lkml.org 
[lkml]   [2011]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, numa: exit early on numa_reset_distance()
On Wed, Feb 16, 2011 at 12:56:47PM -0800, Yinghai Lu wrote:
>
> Do not call __pa(numa_distance), if it is not allocated before.
>
> it will get BUG_ON if VIRTUAL_DEBUG is on.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>

Thanks for spotting this.

> Index: linux-2.6/arch/x86/mm/numa_64.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/mm/numa_64.c
> +++ linux-2.6/arch/x86/mm/numa_64.c
> @@ -371,6 +371,12 @@ static void __init numa_reset_distance(v
> {
> size_t size;
>
> + if (!numa_distance_cnt) {
> + numa_distance = NULL;
> +
> + return;
> + }
> +

But please move the existing numa_distance = NULL before the
conditional and do if (!numa_distance_cnt) return;

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-02-16 23:43    [W:0.098 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site