parisc: Check return value of smp_boot_one_cpu()
authorHelge Deller <deller@gmx.de>
Tue, 20 Sep 2016 15:29:32 +0000 (17:29 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 20 Sep 2016 16:02:36 +0000 (18:02 +0200)
Check return value of smp_boot_one_cpu() whether CPU could be brought up.

Reported-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/smp.c

index c2a9cc55a62f63709e1d1e1b78d9a086ac3a2bf7..75dab2871346ce969d82a9fbb09ffcc0d579fc5c 100644 (file)
@@ -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;
 }