summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-11-02 08:49:23 +0000
committerPekka Enberg <penberg@cs.helsinki.fi>2009-11-08 14:23:46 +0200
commit70c1198da4e8043f6ed72a74be0aaf04aff0e76b (patch)
tree94cdd451ab6f68ffc43e48c40a0d6c3ec14daf9a /mm
parent4bdd652edb4b3cc057e7ad493b43cc0e4e352e27 (diff)
slqb: fix per_cpu access
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 ... Use slqb_ prefix for the global variable so that we don't collide even with the rest of the kernel (s390 and alpha need this). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Piggin <npiggin@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Tested-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Reported-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm')
-rw-r--r--mm/slqb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/slqb.c b/mm/slqb.c
index e745d9ac0956..e4bb53f2e7d8 100644
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -2766,11 +2766,12 @@ out:
schedule_delayed_work(work, round_jiffies_relative(3*HZ));
}
-static DEFINE_PER_CPU(struct delayed_work, cache_trim_work);
+static DEFINE_PER_CPU(struct delayed_work, slqb_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(slqb_cache_trim_work,
+ cpu);
/*
* When this gets called from do_initcalls via cpucache_init(),
@@ -3136,8 +3137,9 @@ static int __cpuinit slab_cpuup_callback(struct notifier_block *nfb,
case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN:
- cancel_rearming_delayed_work(&per_cpu(cache_trim_work, cpu));
- per_cpu(cache_trim_work, cpu).work.func = NULL;
+ cancel_rearming_delayed_work(&per_cpu(slqb_cache_trim_work,
+ cpu));
+ per_cpu(slqb_cache_trim_work, cpu).work.func = NULL;
break;
case CPU_UP_CANCELED: