All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r
@ 2008-11-21 10:39 Rusty Russell
  2008-11-27 17:59 ` Hirokazu Takata
  0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2008-11-21 10:39 UTC (permalink / raw)
  To: Hirokazu Takata; +Cc: Mike Travis, Ingo Molnar, linux-kernel, Ingo Molnar

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 <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
---
 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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r
  2008-11-21 10:39 [PATCH 1/3] percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r Rusty Russell
@ 2008-11-27 17:59 ` Hirokazu Takata
  0 siblings, 0 replies; 2+ messages in thread
From: Hirokazu Takata @ 2008-11-27 17:59 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Hirokazu Takata, Mike Travis, Ingo Molnar, linux-kernel

Acked-by: Hirokazu Takata <takata@linux-m32r.org>

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 <rusty@rustcorp.com.au>
> Signed-off-by: Mike Travis <travis@sgi.com>
> Acked-by: Ingo Molnar <mingo@elte.hu>
> ---
>  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;
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-27 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 10:39 [PATCH 1/3] percpu: fix percpu accessors to potentially !cpu_possible() cpus: m32r Rusty Russell
2008-11-27 17:59 ` Hirokazu Takata

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.