diff options
Diffstat (limited to 'arch/xtensa/kernel/ptrace.c')
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index af9ba80f254c..c72c9473ef99 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -260,6 +260,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
260 | unsigned long addr, unsigned long data) | 260 | unsigned long addr, unsigned long data) |
261 | { | 261 | { |
262 | int ret = -EPERM; | 262 | int ret = -EPERM; |
263 | void __user *datap = (void __user *) data; | ||
263 | 264 | ||
264 | switch (request) { | 265 | switch (request) { |
265 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 266 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
@@ -268,7 +269,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
268 | break; | 269 | break; |
269 | 270 | ||
270 | case PTRACE_PEEKUSR: /* read register specified by addr. */ | 271 | case PTRACE_PEEKUSR: /* read register specified by addr. */ |
271 | ret = ptrace_peekusr(child, addr, (void __user *) data); | 272 | ret = ptrace_peekusr(child, addr, datap); |
272 | break; | 273 | break; |
273 | 274 | ||
274 | case PTRACE_POKETEXT: /* write the word at location addr. */ | 275 | case PTRACE_POKETEXT: /* write the word at location addr. */ |
@@ -281,19 +282,19 @@ long arch_ptrace(struct task_struct *child, long request, | |||
281 | break; | 282 | break; |
282 | 283 | ||
283 | case PTRACE_GETREGS: | 284 | case PTRACE_GETREGS: |
284 | ret = ptrace_getregs(child, (void __user *) data); | 285 | ret = ptrace_getregs(child, datap); |
285 | break; | 286 | break; |
286 | 287 | ||
287 | case PTRACE_SETREGS: | 288 | case PTRACE_SETREGS: |
288 | ret = ptrace_setregs(child, (void __user *) data); | 289 | ret = ptrace_setregs(child, datap); |
289 | break; | 290 | break; |
290 | 291 | ||
291 | case PTRACE_GETXTREGS: | 292 | case PTRACE_GETXTREGS: |
292 | ret = ptrace_getxregs(child, (void __user *) data); | 293 | ret = ptrace_getxregs(child, datap); |
293 | break; | 294 | break; |
294 | 295 | ||
295 | case PTRACE_SETXTREGS: | 296 | case PTRACE_SETXTREGS: |
296 | ret = ptrace_setxregs(child, (void __user *) data); | 297 | ret = ptrace_setxregs(child, datap); |
297 | break; | 298 | break; |
298 | 299 | ||
299 | default: | 300 | default: |