]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/fork.c
kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
[karo-tx-linux.git] / kernel / fork.c
index aaf782327bf330e22c4ef2ca1881c35f4970baf4..93bdba13d7d9effa9ffbd66f8ffde58f00134b07 100644 (file)
@@ -913,14 +913,12 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
        deactivate_mm(tsk, mm);
 
        /*
-        * If we're exiting normally, clear a user-space tid field if
-        * requested.  We leave this alone when dying by signal, to leave
-        * the value intact in a core dump, and to save the unnecessary
-        * trouble, say, a killed vfork parent shouldn't touch this mm.
-        * Userland only wants this done for a sys_exit.
+        * Signal userspace if we're not exiting with a core dump
+        * because we want to leave the value intact for debugging
+        * purposes.
         */
        if (tsk->clear_child_tid) {
-               if (!(tsk->flags & PF_SIGNALED) &&
+               if (!(tsk->signal->flags & SIGNAL_GROUP_COREDUMP) &&
                    atomic_read(&mm->mm_users) > 1) {
                        /*
                         * We don't check the error code - if userspace has