diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-07-25 11:19:33 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-31 16:35:21 -0400 |
commit | 293c5bd13f124c325f74f89ad26edf5612ce7235 (patch) | |
tree | 6de7ce919a10c58e29093776c02e61d7127ed12b /arch/mips/kernel/mips-mt-fpaff.c | |
parent | 01754bbc692929e446e600f69b41013e554399a6 (diff) |
[MIPS] Fixup secure computing stuff.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips-mt-fpaff.c')
-rw-r--r-- | arch/mips/kernel/mips-mt-fpaff.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index ede5d73d652e..892665bb12b1 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -50,6 +50,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
50 | cpumask_t effective_mask; | 50 | cpumask_t effective_mask; |
51 | int retval; | 51 | int retval; |
52 | struct task_struct *p; | 52 | struct task_struct *p; |
53 | struct thread_info *ti; | ||
53 | 54 | ||
54 | if (len < sizeof(new_mask)) | 55 | if (len < sizeof(new_mask)) |
55 | return -EINVAL; | 56 | return -EINVAL; |
@@ -93,16 +94,16 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
93 | read_unlock(&tasklist_lock); | 94 | read_unlock(&tasklist_lock); |
94 | 95 | ||
95 | /* Compute new global allowed CPU set if necessary */ | 96 | /* Compute new global allowed CPU set if necessary */ |
96 | if ((p->thread.mflags & MF_FPUBOUND) | 97 | ti = task_thread_info(p); |
97 | && cpus_intersects(new_mask, mt_fpu_cpumask)) { | 98 | if (test_ti_thread_flag(ti, TIF_FPUBOUND) && |
99 | cpus_intersects(new_mask, mt_fpu_cpumask)) { | ||
98 | cpus_and(effective_mask, new_mask, mt_fpu_cpumask); | 100 | cpus_and(effective_mask, new_mask, mt_fpu_cpumask); |
99 | retval = set_cpus_allowed(p, effective_mask); | 101 | retval = set_cpus_allowed(p, effective_mask); |
100 | } else { | 102 | } else { |
101 | p->thread.mflags &= ~MF_FPUBOUND; | 103 | clear_ti_thread_flag(ti, TIF_FPUBOUND); |
102 | retval = set_cpus_allowed(p, new_mask); | 104 | retval = set_cpus_allowed(p, new_mask); |
103 | } | 105 | } |
104 | 106 | ||
105 | |||
106 | out_unlock: | 107 | out_unlock: |
107 | put_task_struct(p); | 108 | put_task_struct(p); |
108 | unlock_cpu_hotplug(); | 109 | unlock_cpu_hotplug(); |