Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71437
b: refs/heads/master
c: 03ff179
h: refs/heads/master
i:
  71435: f6616a7
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Oct 19, 2007
1 parent dddc3c2 commit ff4ef0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d473012710b815741043942bc41945d444abab40
refs/heads/master: 03ff17979c58a0b63b0fe30a373f41b719731bd2
19 changes: 6 additions & 13 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
static void
forget_original_parent(struct task_struct *father, struct list_head *to_release)
{
struct task_struct *p, *reaper = father;
struct list_head *_p, *_n;
struct task_struct *p, *n, *reaper = father;

do {
reaper = next_thread(reaper);
Expand All @@ -688,9 +687,8 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release)
*
* Search them and reparent children.
*/
list_for_each_safe(_p, _n, &father->children) {
list_for_each_entry_safe(p, n, &father->children, sibling) {
int ptrace;
p = list_entry(_p, struct task_struct, sibling);

ptrace = p->ptrace;

Expand Down Expand Up @@ -718,8 +716,7 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release)
if (unlikely(ptrace && p->exit_state == EXIT_ZOMBIE && p->exit_signal == -1))
list_add(&p->ptrace_list, to_release);
}
list_for_each_safe(_p, _n, &father->ptrace_children) {
p = list_entry(_p, struct task_struct, ptrace_list);
list_for_each_entry_safe(p, n, &father->ptrace_children, ptrace_list) {
p->real_parent = reaper;
reparent_thread(p, father, 1);
}
Expand Down Expand Up @@ -1518,12 +1515,9 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
tsk = current;
do {
struct task_struct *p;
struct list_head *_p;
int ret;

list_for_each(_p,&tsk->children) {
p = list_entry(_p, struct task_struct, sibling);

list_for_each_entry(p, &tsk->children, sibling) {
ret = eligible_child(pid, options, p);
if (!ret)
continue;
Expand Down Expand Up @@ -1605,9 +1599,8 @@ static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
}
}
if (!flag) {
list_for_each(_p, &tsk->ptrace_children) {
p = list_entry(_p, struct task_struct,
ptrace_list);
list_for_each_entry(p, &tsk->ptrace_children,
ptrace_list) {
if (!eligible_child(pid, options, p))
continue;
flag = 1;
Expand Down

0 comments on commit ff4ef0b

Please sign in to comment.