]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/cris/arch-v32/kernel/ptrace.c
Merge branch 'pxa-palm' into pxa-machines
[linux-2.6-omap-h63xx.git] / arch / cris / arch-v32 / kernel / ptrace.c
index 82cf2e3624a41e93a1b748c671406f62043876bc..e27f4670e88e1df11bf35e8fea46649e6da23f63 100644 (file)
@@ -1,12 +1,11 @@
 /*
- * Copyright (C) 2000-2003, Axis Communications AB.
+ * Copyright (C) 2000-2007, Axis Communications AB.
  */
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
@@ -147,15 +146,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                /* Write the word at location address. */
                case PTRACE_POKETEXT:
                case PTRACE_POKEDATA:
-                       ret = 0;
-
-                       if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
-                               break;
-
-                       ret = -EIO;
+                       ret = generic_ptrace_pokedata(child, addr, data);
                        break;
 
-               /* Write the word at location address in the USER area. */
+               /* Write the word at location address in the USER area. */
                case PTRACE_POKEUSR:
                        ret = -EIO;
                        if ((addr & 3) || addr < 0 || addr > PT_MAX << 2)
@@ -207,7 +201,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 
                        break;
 
-               /* Make the child exit by sending it a sigkill. */
+               /* Make the child exit by sending it a sigkill. */
                case PTRACE_KILL:
                        ret = 0;
 
@@ -251,13 +245,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        break;
 
                }
-               case PTRACE_DETACH:
-                       ret = ptrace_detach(child, data);
-                       break;
 
                /* Get all GP registers from the child. */
                case PTRACE_GETREGS: {
-                       int i;
+                       int i;
                        unsigned long tmp;
 
                        for (i = 0; i <= PT_MAX; i++) {
@@ -304,6 +295,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        break;
        }
 
+out_tsk:
        return ret;
 }