From 7f46450c4bdd7f736908c1d28e45cd02d7be1a7e Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Mon, 19 Mar 2012 17:03:22 +0100 Subject: [PATCH] --- yaml --- r: 289712 b: refs/heads/master c: e636825346b36a07ccfc8e30946d52855e21f681 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/exec.c | 3 +++ trunk/kernel/exit.c | 7 +------ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index bfbfbc4c9cfe..7066399bfc6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f8aadd8b9966d71a77bba52b9d499cc2f38269f +refs/heads/master: e636825346b36a07ccfc8e30946d52855e21f681 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index b0695a9900ef..1e94d2263ae0 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -977,6 +977,9 @@ static int de_thread(struct task_struct *tsk) sig->notify_count = 0; no_thread_group: + /* we have changed execution domain */ + tsk->exit_signal = SIGCHLD; + if (current->mm) setmax_mm_hiwater_rss(&sig->maxrss, current->mm); diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 752d2c0abd19..51ac4ced1313 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -827,14 +827,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead) * If the parent exec id doesn't match the exec id we saved * when we started then we know the parent has changed security * domain. - * - * If our self_exec id doesn't match our parent_exec_id then - * we have changed execution domain as these two values started - * the same after a fork. */ if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD && - (tsk->parent_exec_id != tsk->real_parent->self_exec_id || - tsk->self_exec_id != tsk->parent_exec_id)) + tsk->parent_exec_id != tsk->real_parent->self_exec_id) tsk->exit_signal = SIGCHLD; if (unlikely(tsk->ptrace)) {