aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 52b7efd27416..c0b3ebc16317 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2296,11 +2296,9 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
2296 return dest_cpu; 2296 return dest_cpu;
2297 2297
2298 /* No more Mr. Nice Guy. */ 2298 /* No more Mr. Nice Guy. */
2299 if (dest_cpu >= nr_cpu_ids) { 2299 if (unlikely(dest_cpu >= nr_cpu_ids)) {
2300 rcu_read_lock(); 2300 cpumask_copy(&p->cpus_allowed, cpu_possible_mask);
2301 cpuset_cpus_allowed_locked(p, &p->cpus_allowed); 2301 dest_cpu = cpumask_any(cpu_active_mask);
2302 rcu_read_unlock();
2303 dest_cpu = cpumask_any_and(cpu_active_mask, &p->cpus_allowed);
2304 2302
2305 /* 2303 /*
2306 * Don't tell them about moving exiting tasks or 2304 * Don't tell them about moving exiting tasks or
@@ -5866,7 +5864,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
5866 5864
5867 case CPU_DEAD: 5865 case CPU_DEAD:
5868 case CPU_DEAD_FROZEN: 5866 case CPU_DEAD_FROZEN:
5869 cpuset_lock(); /* around calls to cpuset_cpus_allowed_lock() */
5870 migrate_live_tasks(cpu); 5867 migrate_live_tasks(cpu);
5871 rq = cpu_rq(cpu); 5868 rq = cpu_rq(cpu);
5872 kthread_stop(rq->migration_thread); 5869 kthread_stop(rq->migration_thread);
@@ -5879,7 +5876,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
5879 rq->idle->sched_class = &idle_sched_class; 5876 rq->idle->sched_class = &idle_sched_class;
5880 migrate_dead_tasks(cpu); 5877 migrate_dead_tasks(cpu);
5881 raw_spin_unlock_irq(&rq->lock); 5878 raw_spin_unlock_irq(&rq->lock);
5882 cpuset_unlock();
5883 migrate_nr_uninterruptible(rq); 5879 migrate_nr_uninterruptible(rq);
5884 BUG_ON(rq->nr_running != 0); 5880 BUG_ON(rq->nr_running != 0);
5885 calc_global_load_remove(rq); 5881 calc_global_load_remove(rq);