]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/ptrace.c
ARM: OMAP: Add return value check for input_register_device()
[linux-2.6-omap-h63xx.git] / kernel / ptrace.c
index 2dc00298e678fbd77016505490f197e56a02a830..fdb34e86f923f188113e7945e63c572c805c65a2 100644 (file)
@@ -99,9 +99,12 @@ int ptrace_check_attach(struct task_struct *child, int kill)
         * be changed by us so it's not changing right after this.
         */
        read_lock(&tasklist_lock);
-       if ((child->ptrace & PT_PTRACED) && child->parent == current &&
-            child->signal != NULL) {
+       if ((child->ptrace & PT_PTRACED) && child->parent == current) {
                ret = 0;
+               /*
+                * child->sighand can't be NULL, release_task()
+                * does ptrace_unlink() before __exit_signal().
+                */
                spin_lock_irq(&child->sighand->siglock);
                if (task_is_stopped(child))
                        child->state = TASK_TRACED;