Commit 16365e5b authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Willy Tarreau

wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task

wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task

CVE-2013-0871

BugLink: http://bugs.launchpad.net/bugs/1129192

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: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
(backported from commit 9067ac85)

Conflicts:
	kernel/sched/core.c
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
Acked-by: default avatarColin King <colin.king@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 77ae04b3
......@@ -2618,7 +2618,8 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
*/
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment