diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 684819921c93eba072b45ed81e82361f06194c23..24ad9f1deb83f7a168e495bc0d89ad6b7b47ff4f 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1395,7 +1395,12 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) curr->prio <= p->prio)) { int target = find_lowest_rq(p); - if (target != -1) + /* + * Possible race. Don't bother moving it if the + * destination CPU is not running a lower priority task. + */ + if (target != -1 && + p->prio < cpu_rq(target)->rt.highest_prio.curr) cpu = target; } rcu_read_unlock();