diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-03-28 19:11:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 21:36:40 -0500 |
commit | d799f03597cabc6112acb518fc8ab4487aa4f953 (patch) | |
tree | 1cc9561cbe4f463ff5579b14adc960b17a6a2cf4 /kernel | |
parent | d73d65293e3e2de7e916a89c8da30be0948afab7 (diff) |
[PATCH] choose_new_parent: remove unused arg, sanitize exit_state check
'child_reaper' arg is not used in choose_new_parent().
"->exit_state >= EXIT_ZOMBIE" check is a leftover, was
valid when EXIT_ZOMBIE lived in ->state var.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 223a8802b665..e04a59405e99 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -538,13 +538,13 @@ static void exit_mm(struct task_struct * tsk) | |||
538 | mmput(mm); | 538 | mmput(mm); |
539 | } | 539 | } |
540 | 540 | ||
541 | static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_reaper) | 541 | static inline void choose_new_parent(task_t *p, task_t *reaper) |
542 | { | 542 | { |
543 | /* | 543 | /* |
544 | * Make sure we're not reparenting to ourselves and that | 544 | * Make sure we're not reparenting to ourselves and that |
545 | * the parent is not a zombie. | 545 | * the parent is not a zombie. |
546 | */ | 546 | */ |
547 | BUG_ON(p == reaper || reaper->exit_state >= EXIT_ZOMBIE); | 547 | BUG_ON(p == reaper || reaper->exit_state); |
548 | p->real_parent = reaper; | 548 | p->real_parent = reaper; |
549 | } | 549 | } |
550 | 550 | ||
@@ -645,7 +645,7 @@ static void forget_original_parent(struct task_struct * father, | |||
645 | 645 | ||
646 | if (father == p->real_parent) { | 646 | if (father == p->real_parent) { |
647 | /* reparent with a reaper, real father it's us */ | 647 | /* reparent with a reaper, real father it's us */ |
648 | choose_new_parent(p, reaper, child_reaper); | 648 | choose_new_parent(p, reaper); |
649 | reparent_thread(p, father, 0); | 649 | reparent_thread(p, father, 0); |
650 | } else { | 650 | } else { |
651 | /* reparent ptraced task to its real parent */ | 651 | /* reparent ptraced task to its real parent */ |
@@ -666,7 +666,7 @@ static void forget_original_parent(struct task_struct * father, | |||
666 | } | 666 | } |
667 | list_for_each_safe(_p, _n, &father->ptrace_children) { | 667 | list_for_each_safe(_p, _n, &father->ptrace_children) { |
668 | p = list_entry(_p,struct task_struct,ptrace_list); | 668 | p = list_entry(_p,struct task_struct,ptrace_list); |
669 | choose_new_parent(p, reaper, child_reaper); | 669 | choose_new_parent(p, reaper); |
670 | reparent_thread(p, father, 1); | 670 | reparent_thread(p, father, 1); |
671 | } | 671 | } |
672 | } | 672 | } |