linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] MM: slqb, fix per_cpu access
@ 2009-11-01 22:12 Jiri Slaby
  2009-11-02  4:22 ` Tejun Heo
  2009-11-02 13:23 ` Rusty Russell
  0 siblings, 2 replies; 9+ messages in thread
From: Jiri Slaby @ 2009-11-01 22:12 UTC (permalink / raw)
  To: npiggin
  Cc: linux-mm, linux-kernel, Jiri Slaby, Tejun Heo, Rusty Russell,
	Christoph Lameter

We cannot use the same local variable name as the declared per_cpu
variable since commit "percpu: remove per_cpu__ prefix."

Otherwise we would see crashes like:
general protection fault: 0000 [#1] SMP
last sysfs file:
CPU 1
Modules linked in:
Pid: 1, comm: swapper Tainted: G        W  2.6.32-rc5-mm1_64 #860
RIP: 0010:[<ffffffff8142ff94>]  [<ffffffff8142ff94>] start_cpu_timer+0x2b/0x87
...

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Lameter <cl@linux-foundation.org>
---
 mm/slqb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/slqb.c b/mm/slqb.c
index e745d9a..27f5025 100644
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -2770,16 +2770,16 @@ static DEFINE_PER_CPU(struct delayed_work, cache_trim_work);
 
 static void __cpuinit start_cpu_timer(int cpu)
 {
-	struct delayed_work *cache_trim_work = &per_cpu(cache_trim_work, cpu);
+	struct delayed_work *_cache_trim_work = &per_cpu(cache_trim_work, cpu);
 
 	/*
 	 * When this gets called from do_initcalls via cpucache_init(),
 	 * init_workqueues() has already run, so keventd will be setup
 	 * at that time.
 	 */
-	if (keventd_up() && cache_trim_work->work.func == NULL) {
-		INIT_DELAYED_WORK(cache_trim_work, cache_trim_worker);
-		schedule_delayed_work_on(cpu, cache_trim_work,
+	if (keventd_up() && _cache_trim_work->work.func == NULL) {
+		INIT_DELAYED_WORK(_cache_trim_work, cache_trim_worker);
+		schedule_delayed_work_on(cpu, _cache_trim_work,
 					__round_jiffies_relative(HZ, cpu));
 	}
 }
-- 
1.6.4.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2009-11-04  7:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-01 22:12 [PATCH 1/1] MM: slqb, fix per_cpu access Jiri Slaby
2009-11-02  4:22 ` Tejun Heo
2009-11-02  8:49   ` Jiri Slaby
2009-11-02 11:48     ` Dave Young
2009-11-02 15:24     ` Tejun Heo
2009-11-02 16:24     ` Christoph Lameter
2009-11-02 13:23 ` Rusty Russell
2009-11-02 15:31   ` Jiri Slaby
2009-11-04  7:45     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox