Skip to content

Commit

Permalink
Make sure that the processor is actually online or die spectacularly.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent 1d40cfc commit ae1b3d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ae1b3d5

Please sign in to comment.