Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245605
b: refs/heads/master
c: db44fc0
h: refs/heads/master
i:
  245603: 7312cd2
v: v3
  • Loading branch information
Yong Zhang authored and Ingo Molnar committed May 16, 2011
1 parent 10554d3 commit 35f6529
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61eadef6a9bde9ea62fda724a9cb501ce9bc925a
refs/heads/master: db44fc017d5989302713ab4e7f9e922b648f4b59
6 changes: 4 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5946,13 +5946,15 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)

rq = task_rq_lock(p, &flags);

if (cpumask_equal(&p->cpus_allowed, new_mask))
goto out;

if (!cpumask_intersects(new_mask, cpu_active_mask)) {
ret = -EINVAL;
goto out;
}

if (unlikely((p->flags & PF_THREAD_BOUND) && p != current &&
!cpumask_equal(&p->cpus_allowed, new_mask))) {
if (unlikely((p->flags & PF_THREAD_BOUND) && p != current)) {
ret = -EINVAL;
goto out;
}
Expand Down

0 comments on commit 35f6529

Please sign in to comment.