From: Ralf Baechle Date: Fri, 15 Jul 2005 15:44:02 +0000 (+0000) Subject: Make sure that the processor is actually online or die spectacularly. X-Git-Tag: v2.6.15-rc1~731^2~1^2~126 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae1b3d51c89a96c641111e2c103557592577cf51;p=linux-2.6 Make sure that the processor is actually online or die spectacularly. Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 25762917e8..798fce5093 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -142,6 +142,11 @@ int smp_call_function (void (*func) (void *info), void *info, int retry, int i, cpus = num_online_cpus() - 1; int cpu = smp_processor_id(); + /* + * Can die spectacularly if this CPU isn't yet marked online + */ + BUG_ON(!cpu_online(cpu)); + if (!cpus) return 0;