From 3d68e3b75fc800a49e6bc05dc7981c967d611d5d Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Thu, 6 Aug 2009 15:09:28 -0700 Subject: [PATCH] --- yaml --- r: 156430 b: refs/heads/master c: 9c8a8228d0827e0d91d28527209988f672f97d28 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/fork.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 367457a26ba3..5ff890300af6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2198a64a7487aba036f71998ade8a6528070d32c +refs/heads/master: 9c8a8228d0827e0d91d28527209988f672f97d28 diff --git a/trunk/kernel/fork.c b/trunk/kernel/fork.c index 466531eb92cc..021e1138556e 100644 --- a/trunk/kernel/fork.c +++ b/trunk/kernel/fork.c @@ -568,18 +568,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) * 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; + if (tsk->clear_child_tid) { + if (!(tsk->flags & PF_SIGNALED) && + atomic_read(&mm->mm_users) > 1) { + /* + * We don't check the error code - if userspace has + * not set up a proper pointer then tough luck. + */ + put_user(0, tsk->clear_child_tid); + sys_futex(tsk->clear_child_tid, FUTEX_WAKE, + 1, NULL, NULL, 0); + } tsk->clear_child_tid = NULL; - - /* - * We don't check the error code - if userspace has - * not set up a proper pointer then tough luck. - */ - put_user(0, tidptr); - sys_futex(tidptr, FUTEX_WAKE, 1, NULL, NULL, 0); } }