All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jack Steiner <steiner@sgi.com>, Tejun Heo <tj@kernel.org>
Cc: yinghai@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Fix calculation of size of numa_distance
Date: Fri, 25 Feb 2011 16:03:39 +0100	[thread overview]
Message-ID: <20110225150339.GA29895@elte.hu> (raw)
In-Reply-To: <20110225145759.GA1606@sgi.com>


* Jack Steiner <steiner@sgi.com> wrote:

> Fix the calculation of the size of numa_distance array. It is 2-dimemsional
> array. This fixes early panics seen on large numa systems.
> 
> Signed-off-by: Jack Steiner <steiner@sgi.com>
> 
> Index: linux/arch/x86/mm/numa_64.c
> ===================================================================
> --- linux.orig/arch/x86/mm/numa_64.c	2011-02-23 17:46:38.000000000 -0600
> +++ linux/arch/x86/mm/numa_64.c	2011-02-25 08:53:45.781921592 -0600
> @@ -414,7 +414,8 @@ static int __init numa_alloc_distance(vo
>  
>  	for_each_node_mask(i, nodes_parsed)
>  		cnt = i;
> -	size = ++cnt * sizeof(numa_distance[0]);
> +	cnt++;
> +	size = cnt * cnt * sizeof(numa_distance[0]);
>  
>  	phys = memblock_find_in_range(0, (u64)max_pfn_mapped << PAGE_SHIFT,
>  				      size, PAGE_SIZE);

Tejun has queued up a fix for this already. Tejun, mind sending the fix to me ASAP?

Thanks,

	Ingo

  reply	other threads:[~2011-02-25 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 14:57 [PATCH] x86: Fix calculation of size of numa_distance Jack Steiner
2011-02-25 15:03 ` Ingo Molnar [this message]
2011-02-25 15:06   ` [GIT PULL tip:x86/mm] fix incorrect NUMA distance table size calculation Tejun Heo

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=20110225150339.GA29895@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.