diff options
-rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index aaf782327bf3..93bdba13d7d9 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -913,14 +913,12 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
913 | deactivate_mm(tsk, mm); | 913 | deactivate_mm(tsk, mm); |
914 | 914 | ||
915 | /* | 915 | /* |
916 | * If we're exiting normally, clear a user-space tid field if | 916 | * Signal userspace if we're not exiting with a core dump |
917 | * requested. We leave this alone when dying by signal, to leave | 917 | * because we want to leave the value intact for debugging |
918 | * the value intact in a core dump, and to save the unnecessary | 918 | * purposes. |
919 | * trouble, say, a killed vfork parent shouldn't touch this mm. | ||
920 | * Userland only wants this done for a sys_exit. | ||
921 | */ | 919 | */ |
922 | if (tsk->clear_child_tid) { | 920 | if (tsk->clear_child_tid) { |
923 | if (!(tsk->flags & PF_SIGNALED) && | 921 | if (!(tsk->signal->flags & SIGNAL_GROUP_COREDUMP) && |
924 | atomic_read(&mm->mm_users) > 1) { | 922 | atomic_read(&mm->mm_users) > 1) { |
925 | /* | 923 | /* |
926 | * We don't check the error code - if userspace has | 924 | * We don't check the error code - if userspace has |