summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched_fair.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index f881fc5e035c..2208692dc4a0 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -925,6 +925,9 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
this_cpu = smp_processor_id();
new_cpu = cpu;
+ if (cpu == this_cpu)
+ goto out_set_cpu;
+
for_each_domain(this_cpu, sd) {
if (cpu_isset(cpu, sd->span)) {
this_sd = sd;