diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9446b2e5eac5a..53487d576db1a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -506,7 +506,8 @@ void resched_cpu(int cpu) unsigned long flags; raw_spin_lock_irqsave(&rq->lock, flags); - resched_curr(rq); + if (cpu_online(cpu) || cpu == smp_processor_id()) + resched_curr(rq); raw_spin_unlock_irqrestore(&rq->lock, flags); }