aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e9c24a128655..164fe7fe0d89 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5563,6 +5563,12 @@ int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)
5563 goto out; 5563 goto out;
5564 } 5564 }
5565 5565
5566 if (unlikely((p->flags & PF_THREAD_BOUND) && p != current &&
5567 !cpus_equal(p->cpus_allowed, *new_mask))) {
5568 ret = -EINVAL;
5569 goto out;
5570 }
5571
5566 if (p->sched_class->set_cpus_allowed) 5572 if (p->sched_class->set_cpus_allowed)
5567 p->sched_class->set_cpus_allowed(p, new_mask); 5573 p->sched_class->set_cpus_allowed(p, new_mask);
5568 else { 5574 else {