From: David S. Miller Date: Mon, 7 Apr 2008 07:25:35 +0000 (-0700) Subject: SPARC64: Fix __get_cpu_var in preemption-enabled area. X-Git-Tag: v2.6.24.5~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b337d60a526f4461d681cd537d6b0f2d176f0ad;p=thirdparty%2Fkernel%2Fstable.git SPARC64: Fix __get_cpu_var in preemption-enabled area. Upstream commit: 69072f6e8e4bd4799d2a54e4ff8771d0657512c1 Reported by Mariusz Kozlowski. Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c index 3f10fc921b00e..a0f000b293de6 100644 --- a/arch/sparc64/mm/tlb.c +++ b/arch/sparc64/mm/tlb.c @@ -23,10 +23,11 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers) = { 0, }; void flush_tlb_pending(void) { - struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); + struct mmu_gather *mp; preempt_disable(); + mp = &__get_cpu_var(mmu_gathers); if (mp->tlb_nr) { flush_tsb_user(mp);