diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-29 16:32:35 -0500 |
commit | 33edcf133ba93ecba2e4b6472e97b689895d805c (patch) | |
tree | 327d7a20acef64005e7c5ccbfa1265be28aeb6ac /arch/mips/kernel/mips-mt-fpaff.c | |
parent | be4d638c1597580ed2294d899d9f1a2cd10e462c (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/mips/kernel/mips-mt-fpaff.c')
-rw-r--r-- | arch/mips/kernel/mips-mt-fpaff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index dc9eb72ed9de..5e77a3a21f98 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -51,6 +51,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
51 | int retval; | 51 | int retval; |
52 | struct task_struct *p; | 52 | struct task_struct *p; |
53 | struct thread_info *ti; | 53 | struct thread_info *ti; |
54 | uid_t euid; | ||
54 | 55 | ||
55 | if (len < sizeof(new_mask)) | 56 | if (len < sizeof(new_mask)) |
56 | return -EINVAL; | 57 | return -EINVAL; |
@@ -76,9 +77,9 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
76 | */ | 77 | */ |
77 | get_task_struct(p); | 78 | get_task_struct(p); |
78 | 79 | ||
80 | euid = current_euid(); | ||
79 | retval = -EPERM; | 81 | retval = -EPERM; |
80 | if ((current->euid != p->euid) && (current->euid != p->uid) && | 82 | if (euid != p->euid && euid != p->uid && !capable(CAP_SYS_NICE)) { |
81 | !capable(CAP_SYS_NICE)) { | ||
82 | read_unlock(&tasklist_lock); | 83 | read_unlock(&tasklist_lock); |
83 | goto out_unlock; | 84 | goto out_unlock; |
84 | } | 85 | } |