summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-10-18 12:31:07 +0800
committerAlex Shi <alex.shi@linaro.org>2016-10-18 12:31:07 +0800
commita66f9577c6e5280d83d45152aea29cf5e4548858 (patch)
treeebb42fa6ef16a535adbd5acb8cc79bdd2980da24 /kernel/fork.c
parent26700159745df7db2bc75e8032d2a36913c37880 (diff)
parent2308e34317c8cc7beb03a3d18dc39d32015eff06 (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
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