2004-11-29 11:56:25

by kladit

[permalink] [raw]
Subject: Re: do_wait fix for 2.6.10-rc1

--- kernel/exit.ORIG.c 2004-11-24 17:20:32.000000000 +0100
+++ kernel/exit.c 2004-11-26 17:38:36.000000000 +0100
@@ -1316,6 +1316,9 @@ static long do_wait(pid_t pid, int optio
DECLARE_WAITQUEUE(wait, current);
struct task_struct *tsk;
int flag, retval;
+ struct task_struct *p;
+ struct list_head *_p;
+ int ret;

add_wait_queue(&current->wait_chldexit,&wait);
repeat:
@@ -1324,9 +1327,6 @@ repeat:
read_lock(&tasklist_lock);
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);
@@ -1377,10 +1377,11 @@ repeat:
goto end;
break;
}
- flag = 1;
check_continued:
- if (!unlikely(options & WCONTINUED))
+ if (!unlikely(options & WCONTINUED)) {
+ flag = 1;
continue;
+ }
retval = wait_task_continued(
p, (options & WNOWAIT),
infop, stat_addr, ru);


Attachments:
2patch-exit.c (937.00 B)