do_wait: fix the theoretical race with stop/trace/cont
Changes
1 files changed · +2 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| kernel/exit.c | modified | +2 | −2 | View file |
kernel/exit.c
View filediff --git a/kernel/exit.c b/kernel/exit.c
index dd83c84..7ef355d 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1581,7 +1581,7 @@ repeat:
(!wo->wo_pid || hlist_empty(&wo->wo_pid->tasks[wo->wo_type])))
goto notask;
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
read_lock(&tasklist_lock);
tsk = current;
do {
@@ -1608,7 +1608,7 @@ notask:
}
}
end:
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(¤t->signal->wait_chldexit,&wait);
if (wo->wo_info) {
struct siginfo __user *infop = wo->wo_info;