aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/ptrace_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r--arch/sh/kernel/ptrace_32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 035cb300d3dc..84bf3420597c 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -27,6 +27,7 @@
27#include <asm/system.h> 27#include <asm/system.h>
28#include <asm/processor.h> 28#include <asm/processor.h>
29#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
30#include <asm/syscalls.h>
30 31
31/* 32/*
32 * does not yet catch signals sent when the child dies. 33 * does not yet catch signals sent when the child dies.
@@ -105,6 +106,7 @@ void ptrace_disable(struct task_struct *child)
105long arch_ptrace(struct task_struct *child, long request, long addr, long data) 106long arch_ptrace(struct task_struct *child, long request, long addr, long data)
106{ 107{
107 struct user * dummy = NULL; 108 struct user * dummy = NULL;
109 unsigned long __user *datap = (unsigned long __user *)data;
108 int ret; 110 int ret;
109 111
110 switch (request) { 112 switch (request) {
@@ -133,7 +135,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
133 tmp = !!tsk_used_math(child); 135 tmp = !!tsk_used_math(child);
134 else 136 else
135 tmp = 0; 137 tmp = 0;
136 ret = put_user(tmp, (unsigned long __user *)data); 138 ret = put_user(tmp, datap);
137 break; 139 break;
138 } 140 }
139 141
@@ -202,7 +204,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
202 } 204 }
203 205
204 ret = 0; 206 ret = 0;
205 if (put_user(tmp, (unsigned long *) data)) { 207 if (put_user(tmp, datap)) {
206 ret = -EFAULT; 208 ret = -EFAULT;
207 break; 209 break;
208 } 210 }