diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index cca1835efa7b..ed80d6bd76c8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -5730,6 +5730,8 @@ static unsigned long capacity_spare_wake(int cpu, struct task_struct *p) | |||
5730 | /* | 5730 | /* |
5731 | * find_idlest_group finds and returns the least busy CPU group within the | 5731 | * find_idlest_group finds and returns the least busy CPU group within the |
5732 | * domain. | 5732 | * domain. |
5733 | * | ||
5734 | * Assumes p is allowed on at least one CPU in sd. | ||
5733 | */ | 5735 | */ |
5734 | static struct sched_group * | 5736 | static struct sched_group * |
5735 | find_idlest_group(struct sched_domain *sd, struct task_struct *p, | 5737 | find_idlest_group(struct sched_domain *sd, struct task_struct *p, |
@@ -5917,6 +5919,9 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p | |||
5917 | { | 5919 | { |
5918 | int new_cpu = prev_cpu; | 5920 | int new_cpu = prev_cpu; |
5919 | 5921 | ||
5922 | if (!cpumask_intersects(sched_domain_span(sd), &p->cpus_allowed)) | ||
5923 | return prev_cpu; | ||
5924 | |||
5920 | while (sd) { | 5925 | while (sd) { |
5921 | struct sched_group *group; | 5926 | struct sched_group *group; |
5922 | struct sched_domain *tmp; | 5927 | struct sched_domain *tmp; |