diff --git a/[refs] b/[refs] index 172044d21860..2593abc55023 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 736c4b8572ac24b1e6fd58d00872305a120ac700 +refs/heads/master: fec1d0115240593b39898289e6e1413ea6e44a84 diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c index 2cf74edd3295..f37980df1d58 100644 --- a/trunk/kernel/fork.c +++ b/trunk/kernel/fork.c @@ -448,7 +448,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) tsk->vfork_done = NULL; complete(vfork_done); } - if (tsk->clear_child_tid && atomic_read(&mm->mm_users) > 1) { + + /* + * 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 otherwise. Userland only wants this done for a sys_exit. + */ + if (tsk->clear_child_tid + && !(tsk->flags & PF_SIGNALED) + && atomic_read(&mm->mm_users) > 1) { u32 __user * tidptr = tsk->clear_child_tid; tsk->clear_child_tid = NULL;