sched: fix cpu hotplug
[firefly-linux-kernel-4.4.55.git] / kernel / sched.c
index 94ead43eda62bf8ebb9e054d9cad2a5838fe8f90..9397b87101380bba27caac4965d9a6a1a5c763d8 100644 (file)
@@ -5621,8 +5621,10 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
 
        double_rq_lock(rq_src, rq_dest);
        /* Already moved. */
-       if (task_cpu(p) != src_cpu)
+       if (task_cpu(p) != src_cpu) {
+               ret = 1;
                goto out;
+       }
        /* Affinity changed (again). */
        if (!cpu_isset(dest_cpu, p->cpus_allowed))
                goto out;