diff options
Diffstat (limited to 'arch/mips/kernel/ptrace32.c')
-rw-r--r-- | arch/mips/kernel/ptrace32.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index 0c82b25d8c6d..0d5cf97af727 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -88,7 +88,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
88 | ret = -EIO; | 88 | ret = -EIO; |
89 | if (copied != sizeof(tmp)) | 89 | if (copied != sizeof(tmp)) |
90 | break; | 90 | break; |
91 | ret = put_user(tmp, (unsigned int *) (unsigned long) data); | 91 | ret = put_user(tmp, (unsigned int __user *) (unsigned long) data); |
92 | break; | 92 | break; |
93 | } | 93 | } |
94 | 94 | ||
@@ -174,8 +174,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
174 | case FPC_EIR: { /* implementation / version register */ | 174 | case FPC_EIR: { /* implementation / version register */ |
175 | unsigned int flags; | 175 | unsigned int flags; |
176 | 176 | ||
177 | if (!cpu_has_fpu) | 177 | if (!cpu_has_fpu) { |
178 | tmp = 0; | ||
178 | break; | 179 | break; |
180 | } | ||
179 | 181 | ||
180 | preempt_disable(); | 182 | preempt_disable(); |
181 | if (cpu_has_mipsmt) { | 183 | if (cpu_has_mipsmt) { |
@@ -194,15 +196,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
194 | preempt_enable(); | 196 | preempt_enable(); |
195 | break; | 197 | break; |
196 | } | 198 | } |
197 | case DSP_BASE ... DSP_BASE + 5: | 199 | case DSP_BASE ... DSP_BASE + 5: { |
200 | dspreg_t *dregs; | ||
201 | |||
198 | if (!cpu_has_dsp) { | 202 | if (!cpu_has_dsp) { |
199 | tmp = 0; | 203 | tmp = 0; |
200 | ret = -EIO; | 204 | ret = -EIO; |
201 | goto out_tsk; | 205 | goto out_tsk; |
202 | } | 206 | } |
203 | dspreg_t *dregs = __get_dsp_regs(child); | 207 | dregs = __get_dsp_regs(child); |
204 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); | 208 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); |
205 | break; | 209 | break; |
210 | } | ||
206 | case DSP_CONTROL: | 211 | case DSP_CONTROL: |
207 | if (!cpu_has_dsp) { | 212 | if (!cpu_has_dsp) { |
208 | tmp = 0; | 213 | tmp = 0; |
@@ -216,7 +221,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
216 | ret = -EIO; | 221 | ret = -EIO; |
217 | goto out_tsk; | 222 | goto out_tsk; |
218 | } | 223 | } |
219 | ret = put_user(tmp, (unsigned *) (unsigned long) data); | 224 | ret = put_user(tmp, (unsigned __user *) (unsigned long) data); |
220 | break; | 225 | break; |
221 | } | 226 | } |
222 | 227 | ||
@@ -304,15 +309,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
304 | else | 309 | else |
305 | child->thread.fpu.soft.fcr31 = data; | 310 | child->thread.fpu.soft.fcr31 = data; |
306 | break; | 311 | break; |
307 | case DSP_BASE ... DSP_BASE + 5: | 312 | case DSP_BASE ... DSP_BASE + 5: { |
313 | dspreg_t *dregs; | ||
314 | |||
308 | if (!cpu_has_dsp) { | 315 | if (!cpu_has_dsp) { |
309 | ret = -EIO; | 316 | ret = -EIO; |
310 | break; | 317 | break; |
311 | } | 318 | } |
312 | 319 | ||
313 | dspreg_t *dregs = __get_dsp_regs(child); | 320 | dregs = __get_dsp_regs(child); |
314 | dregs[addr - DSP_BASE] = data; | 321 | dregs[addr - DSP_BASE] = data; |
315 | break; | 322 | break; |
323 | } | ||
316 | case DSP_CONTROL: | 324 | case DSP_CONTROL: |
317 | if (!cpu_has_dsp) { | 325 | if (!cpu_has_dsp) { |
318 | ret = -EIO; | 326 | ret = -EIO; |