X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=kernel%2Ffork.c;h=beb31725f7e2746fb17cdd305c4193ab2c70e551;hb=601b58699440b421756e5a2b8f3f2211879dd94d;hp=36c0daa03c60819976e59b2ae75df2cfd799e533;hpb=511a8cdb650544b7efd1bbccf7967d3153aee5f6;p=deliverable%2Flinux.git diff --git a/kernel/fork.c b/kernel/fork.c index 36c0daa03c60..beb31725f7e2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -936,14 +936,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