[PATCH] use ptrace_get_task_struct in various places
[sfrench/cifs-2.6.git] / arch / ia64 / kernel / ptrace.c
index 4b19d04106326db6b01cfa3735421d07c27a4190..8d88eeea02d12fa762a1d54ba71ce15be73529c9 100644 (file)
@@ -1422,14 +1422,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
        lock_kernel();
        ret = -EPERM;
        if (request == PTRACE_TRACEME) {
-               /* are we already being traced? */
-               if (current->ptrace & PT_PTRACED)
-                       goto out;
-               ret = security_ptrace(current->parent, current);
-               if (ret)
-                       goto out;
-               current->ptrace |= PT_PTRACED;
-               ret = 0;
+               ret = ptrace_traceme();
                goto out;
        }