]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ia64: don't access per-CPU data of off-line CPUs
authorKochi Takayoshi <kochi@hpc.bs1.fc.nec.co.jp>
Mon, 3 Nov 2003 14:31:24 +0000 (06:31 -0800)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Mon, 3 Nov 2003 14:31:24 +0000 (06:31 -0800)
This patch prevents a crash that happens when per-CPU data is allocated
only for CPUs that are online.

arch/ia64/mm/tlb.c

index ec89adf23c6ac6c24357cf670d5c5452f136a0fd..23bea1f2a6dc601e2903c478f3be4b1ef8e0000e 100644 (file)
@@ -77,7 +77,7 @@ wrap_mmu_context (struct mm_struct *mm)
        {
                int cpu = get_cpu(); /* prevent preemption/migration */
                for (i = 0; i < NR_CPUS; ++i)
-                       if (i != cpu)
+                       if (cpu_online(i) && (i != cpu))
                                per_cpu(ia64_need_tlb_flush, i) = 1;
                put_cpu();
        }