PTRACE_PEEKDATA consolidation
[firefly-linux-kernel-4.4.55.git] / arch / cris / arch-v10 / kernel / ptrace.c
index fd2129a04586551bc24ae0d2278ac43b1e48426a..74b1b4dc822527a5f901d899233bc5f187735fe9 100644 (file)
@@ -83,19 +83,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        switch (request) {
                /* Read word at location address. */ 
                case PTRACE_PEEKTEXT:
-               case PTRACE_PEEKDATA: {
-                       unsigned long tmp;
-                       int copied;
-
-                       copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-                       ret = -EIO;
-                       
-                       if (copied != sizeof(tmp))
-                               break;
-                       
-                       ret = put_user(tmp,datap);
+               case PTRACE_PEEKDATA:
+                       ret = generic_ptrace_peekdata(child, addr, data);
                        break;
-               }
 
                /* Read the word at location address in the USER area. */
                case PTRACE_PEEKUSR: {