From: "Jan Beulich" Subject: [PATCH] x86: Re: cs 19927 crashes during boot with debug=y Date: Wed, 15 Jul 2009 08:54:20 +0100 Message-ID: <4A5DA74C020000780000A7FF@vpn.id2.novell.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: George Dunlap List-Id: xen-devel@lists.xenproject.org Fix an oversight of c/s 19927 - per-CPU data accesses must not be iterated over using NR_CPUS bound loops. Signed-off-by: Jan Beulich --- 2009-07-10.orig/xen/arch/x86/smpboot.c 2009-07-10 13:57:41.0000000= 00 +0200 +++ 2009-07-10/xen/arch/x86/smpboot.c 2009-07-15 09:36:05.000000000 = +0200 @@ -1163,7 +1163,7 @@ static void __init smp_boot_cpus(unsigne * construct cpu_sibling_map, so that we can tell sibling CPUs * efficiently. */ - for (cpu =3D 0; cpu < NR_CPUS; cpu++) { + for_each_cpu(cpu) { cpus_clear(per_cpu(cpu_sibling_map, cpu)); cpus_clear(per_cpu(cpu_core_map, cpu)); }