diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-01-21 20:48:17 +0100 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2014-02-10 16:11:05 -0500 |
commit | e9bf40599d67972c356eb7c024d36ba9093f363c (patch) | |
tree | 91d216d9bd01a7a7bc5f7da541976936e9766a33 | |
parent | 8f0d69d53f4c0fe576d7dfedeaa281e19145f363 (diff) |
wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task
commit 9067ac85d533651b98c2ff903182a20cbb361fcb upstream.
wake_up_process() should never wakeup a TASK_STOPPED/TRACED task.
Change it to use TASK_NORMAL and add the WARN_ON().
TASK_ALL has no other users, probably can be killed.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[PG: kernel/sched/core.c --> kernel/sched.c on 2.6.34]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index e24d139ff69..ddcb8aeb2f5 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2492,7 +2492,8 @@ out: */ int wake_up_process(struct task_struct *p) { - return try_to_wake_up(p, TASK_ALL, 0); + WARN_ON(task_is_stopped_or_traced(p)); + return try_to_wake_up(p, TASK_NORMAL, 0); } EXPORT_SYMBOL(wake_up_process); |