diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-01-21 20:48:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-27 20:47:43 -0800 |
commit | 465760c68a4e5037f10a7eab1df3fb2aff1e03a4 (patch) | |
tree | 01412ebaacf8ff07622f0048e2dad45643ba4790 /kernel | |
parent | 9b6d794e7e56f3a413c57a15d4e07fb7efe6530a (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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1d22981cd431..e1718bc35e16 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1688,7 +1688,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); |