Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175577
b: refs/heads/master
c: 3160568
h: refs/heads/master
i:
  175575: 765a04a
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Dec 9, 2009
1 parent 8aec508 commit a448376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ad4c18884e864cf4c77f9074d3d1816063f99cd
refs/heads/master: 3160568371da441b7f2fb57f2f1225404207e8f2
4 changes: 4 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6631,6 +6631,8 @@ SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
long sched_getaffinity(pid_t pid, struct cpumask *mask)
{
struct task_struct *p;
unsigned long flags;
struct rq *rq;
int retval;

get_online_cpus();
Expand All @@ -6645,7 +6647,9 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask)
if (retval)
goto out_unlock;

rq = task_rq_lock(p, &flags);
cpumask_and(mask, &p->cpus_allowed, cpu_online_mask);
task_rq_unlock(rq, &flags);

out_unlock:
read_unlock(&tasklist_lock);
Expand Down

0 comments on commit a448376

Please sign in to comment.