Merge tag 'smp-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Merge commit. Changes below are compared with the first parent: ca21b9b3.
Changes
2 files changed · +3 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| kernel/smp.c | modified | +1 | −1 | View file |
| kernel/up.c | modified | +2 | −1 | View file |
kernel/smp.c
View filediff --git a/kernel/smp.c b/kernel/smp.c
index 3b7bedc..d0ada39 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -435,7 +435,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
/* Fastpath: do that cpu by itself. */
if (next_cpu >= nr_cpu_ids) {
- if (!cond_func || (cond_func && cond_func(cpu, info)))
+ if (!cond_func || cond_func(cpu, info))
smp_call_function_single(cpu, func, info, wait);
return;
}
kernel/up.c
View filediff --git a/kernel/up.c b/kernel/up.c
index 53144d0..c6f323d 100644
--- a/kernel/up.c
+++ b/kernel/up.c
@@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
{
unsigned long flags;
- WARN_ON(cpu != 0);
+ if (cpu != 0)
+ return -ENXIO;
local_irq_save(flags);
func(info);