]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/ptrace.c
twl4030-gpio use new gpiolib hooks
[linux-2.6-omap-h63xx.git] / kernel / ptrace.c
index 8392a9da64504054bf804e5809f902bc296f676f..356699a96d565faa2e034253f9178c7d0aa2829d 100644 (file)
@@ -107,7 +107,7 @@ int ptrace_check_attach(struct task_struct *child, int kill)
        read_unlock(&tasklist_lock);
 
        if (!ret && !kill)
-               wait_task_inactive(child);
+               ret = wait_task_inactive(child, TASK_TRACED) ? 0 : -ESRCH;
 
        /* All systems go.. */
        return ret;
@@ -140,7 +140,7 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
        if (!dumpable && !capable(CAP_SYS_PTRACE))
                return -EPERM;
 
-       return security_ptrace(current, task, mode);
+       return security_ptrace_may_access(task, mode);
 }
 
 bool ptrace_may_access(struct task_struct *task, unsigned int mode)
@@ -499,8 +499,7 @@ repeat:
                        goto repeat;
                }
 
-               ret = security_ptrace(current->parent, current,
-                                     PTRACE_MODE_ATTACH);
+               ret = security_ptrace_traceme(current->parent);
 
                /*
                 * Set the ptrace bit in the process ptrace flags.