From 42dda3239d5b55a9638e9b6d9f20649e10b48eba Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Fri, 5 Mar 2010 13:44:14 -0800 Subject: [PATCH] --- yaml --- r: 186319 b: refs/heads/master c: 5c99cbf49a6e1a1efd25b11f4604c65c455e1612 h: refs/heads/master i: 186317: 051bd8876f7155be5be04296ee2d4fbd64fe12f2 186315: f2de324c66d009c475462f993479f485d70570fb 186311: 86c40760652ec7f5789f70efc37e16e65717c0fc 186303: 4cc6a77fb0857a1ddb2a13611e16b8a4fc6b2817 v: v3 --- [refs] | 2 +- trunk/fs/exec.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 1cb1511d3c37..bc33b9437191 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30736a4d43f4af7f1a7836d6a266be17082195c4 +refs/heads/master: 5c99cbf49a6e1a1efd25b11f4604c65c455e1612 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index 89d4080c1435..829a6c6d1803 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -1561,12 +1561,13 @@ static int format_corename(char *corename, long signr) return ispipe; } -static int zap_process(struct task_struct *start) +static int zap_process(struct task_struct *start, int exit_code) { struct task_struct *t; int nr = 0; start->signal->flags = SIGNAL_GROUP_EXIT; + start->signal->group_exit_code = exit_code; start->signal->group_stop_count = 0; t = start; @@ -1591,8 +1592,7 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, spin_lock_irq(&tsk->sighand->siglock); if (!signal_group_exit(tsk->signal)) { mm->core_state = core_state; - tsk->signal->group_exit_code = exit_code; - nr = zap_process(tsk); + nr = zap_process(tsk, exit_code); } spin_unlock_irq(&tsk->sighand->siglock); if (unlikely(nr < 0)) @@ -1641,7 +1641,7 @@ static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, if (p->mm) { if (unlikely(p->mm == mm)) { lock_task_sighand(p, &flags); - nr += zap_process(p); + nr += zap_process(p, exit_code); unlock_task_sighand(p, &flags); } break;