aboutsummaryrefslogtreecommitdiffstats
path: root/arch/score/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/score/kernel/ptrace.c')
-rw-r--r--arch/score/kernel/ptrace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/score/kernel/ptrace.c b/arch/score/kernel/ptrace.c
index 19911e3187be..1db876b11476 100644
--- a/arch/score/kernel/ptrace.c
+++ b/arch/score/kernel/ptrace.c
@@ -267,6 +267,7 @@ long
267arch_ptrace(struct task_struct *child, long request, long addr, long data) 267arch_ptrace(struct task_struct *child, long request, long addr, long data)
268{ 268{
269 int ret; 269 int ret;
270 unsigned long __user *datap = (void __user *)data;
270 271
271 switch (request) { 272 switch (request) {
272 /* Read the word at location addr in the USER area. */ 273 /* Read the word at location addr in the USER area. */
@@ -316,7 +317,7 @@ arch_ptrace(struct task_struct *child, long request, long addr, long data)
316 return -EIO; 317 return -EIO;
317 } 318 }
318 319
319 ret = put_user(tmp, (unsigned long *) data); 320 ret = put_user(tmp, (unsigned int __user *) datap);
320 return ret; 321 return ret;
321 } 322 }
322 323
@@ -355,11 +356,11 @@ arch_ptrace(struct task_struct *child, long request, long addr, long data)
355 } 356 }
356 357
357 case PTRACE_GETREGS: 358 case PTRACE_GETREGS:
358 ret = ptrace_getregs(child, (void __user *)data); 359 ret = ptrace_getregs(child, (void __user *)datap);
359 break; 360 break;
360 361
361 case PTRACE_SETREGS: 362 case PTRACE_SETREGS:
362 ret = ptrace_setregs(child, (void __user *)data); 363 ret = ptrace_setregs(child, (void __user *)datap);
363 break; 364 break;
364 365
365 default: 366 default: