]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/xtensa/kernel/ptrace.c
Pull dock-bay into release branch
[linux-2.6-omap-h63xx.git] / arch / xtensa / kernel / ptrace.c
index 8b6d3d0623b6f56d4570d9d866c33e38c8f65896..06a13d9b69db54945e4d8a979e4468c88b9861ca 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/security.h>
 #include <linux/signal.h>
 
@@ -51,18 +50,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        switch (request) {
        case PTRACE_PEEKTEXT: /* read word at location addr. */
        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,(unsigned long *) data);
-
+               ret = generic_ptrace_peekdata(child, addr, data);
                goto out;
-       }
 
        /* Read the word at location addr in the USER area.  */
 
@@ -139,10 +128,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 
        case PTRACE_POKETEXT: /* write the word at location addr. */
        case PTRACE_POKEDATA:
-               if (access_process_vm(child, addr, &data, sizeof(data), 1)
-                   == sizeof(data))
-                       break;
-               ret = -EIO;
+               ret = generic_ptrace_pokedata(child, addr, data);
                goto out;
 
        case PTRACE_POKEUSR: