From 5baf919dd75817ba23423a8c9ef9be357fe2bb94 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 20 Sep 2016 17:29:32 +0200 Subject: [PATCH] parisc: Check return value of smp_boot_one_cpu() Check return value of smp_boot_one_cpu() whether CPU could be brought up. Reported-by: John David Anglin Signed-off-by: Helge Deller --- arch/parisc/kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index c2a9cc55a62f..75dab2871346 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -412,8 +412,8 @@ void smp_cpus_done(unsigned int cpu_max) int __cpu_up(unsigned int cpu, struct task_struct *tidle) { - if (cpu != 0 && cpu < parisc_max_cpus) - smp_boot_one_cpu(cpu, tidle); + if (cpu != 0 && cpu < parisc_max_cpus && smp_boot_one_cpu(cpu, tidle)) + return -ENOSYS; return cpu_online(cpu) ? 0 : -ENOSYS; }