Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46129
b: refs/heads/master
c: 7418cb8
h: refs/heads/master
i:
  46127: 90300ee
v: v3
  • Loading branch information
David Quigley authored and Ralf Baechle committed Feb 6, 2007
1 parent a91894a commit dc36011
Show file tree
Hide file tree
Showing 2 changed files with 8 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: c9170617510059c750cb91207b08f35001571a22
refs/heads/master: 7418cb89af6f9e21660d60a4bd088a8b6fd11e81
9 changes: 7 additions & 2 deletions trunk/arch/mips/kernel/mips-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len,
goto out_unlock;
}

retval = security_task_setscheduler(p, 0, NULL);
if (retval)
goto out_unlock;

/* Record new user-specified CPU set for future reference */
p->thread.user_cpus_allowed = new_mask;

Expand Down Expand Up @@ -141,8 +145,9 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
p = find_process_by_pid(pid);
if (!p)
goto out_unlock;

retval = 0;
retval = security_task_getscheduler(p);
if (retval)
goto out_unlock;

cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);

Expand Down

0 comments on commit dc36011

Please sign in to comment.