diff options
Diffstat (limited to 'arch/avr32/kernel/ptrace.c')
-rw-r--r-- | arch/avr32/kernel/ptrace.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 3c36c2d16148..1043fdc2df7f 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -153,7 +153,6 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs) | |||
153 | 153 | ||
154 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 154 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
155 | { | 155 | { |
156 | unsigned long tmp; | ||
157 | int ret; | 156 | int ret; |
158 | 157 | ||
159 | pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", | 158 | pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n", |
@@ -166,11 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
166 | /* Read the word at location addr in the child process */ | 165 | /* Read the word at location addr in the child process */ |
167 | case PTRACE_PEEKTEXT: | 166 | case PTRACE_PEEKTEXT: |
168 | case PTRACE_PEEKDATA: | 167 | case PTRACE_PEEKDATA: |
169 | ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 168 | ret = generic_ptrace_peekdata(child, addr, data); |
170 | if (ret == sizeof(tmp)) | ||
171 | ret = put_user(tmp, (unsigned long __user *)data); | ||
172 | else | ||
173 | ret = -EIO; | ||
174 | break; | 169 | break; |
175 | 170 | ||
176 | case PTRACE_PEEKUSR: | 171 | case PTRACE_PEEKUSR: |