summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2016-10-14 13:34:43 -0700
committerDmitry Shmidt <dimitrysh@google.com>2016-10-14 13:34:43 -0700
commit14de94f03d2c7562542599224e88965bc4d20a1d (patch)
treebe0ea1d0fd305bf61d91f11f7ffc31f930f1aa49 /kernel/fork.c
parentfed8e608c338037d3ae408089631b731d21a8d80 (diff)
parent11bfbae19413a2ffe70378b6e572be263869a2bc (diff)
Merge tag 'v4.4.24' into android-4.4.y
This is the 4.4.24 stable release
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index a1d163250909..18a5cb17035a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -902,14 +902,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