From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753907AbYK0SWm (ORCPT ); Thu, 27 Nov 2008 13:22:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751944AbYK0SWe (ORCPT ); Thu, 27 Nov 2008 13:22:34 -0500 Received: from mail1.asahi-net.or.jp ([202.224.39.197]:26406 "EHLO mail.asahi-net.or.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751841AbYK0SWd (ORCPT ); Thu, 27 Nov 2008 13:22:33 -0500 X-Greylist: delayed 1343 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Nov 2008 13:22:33 EST Date: Fri, 28 Nov 2008 02:59:39 +0900 Message-ID: From: Hirokazu Takata To: Rusty Russell Cc: Hirokazu Takata , Mike Travis , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r In-Reply-To: <200811212109.01479.rusty@rustcorp.com.au> References: <200811212109.01479.rusty@rustcorp.com.au> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Hirokazu Takata At Fri, 21 Nov 2008 21:09:01 +1030, Rusty Russell wrote: > > Impact: CPU iterator bugfixes > > Percpu areas are only allocated for possible cpus. In general, you > shouldn't access random cpu's percpu areas. > > Signed-off-by: Rusty Russell > Signed-off-by: Mike Travis > Acked-by: Ingo Molnar > --- > arch/m32r/kernel/smpboot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- test-compile.orig/arch/m32r/kernel/smpboot.c > +++ test-compile/arch/m32r/kernel/smpboot.c > @@ -598,7 +598,7 @@ int setup_profiling_timer(unsigned int m > * accounting. At that time they also adjust their APIC timers > * accordingly. > */ > - for (i = 0; i < NR_CPUS; ++i) > + for_each_possible_cpu(i) > per_cpu(prof_multiplier, i) = multiplier; > > return 0; > >