Patchwork [3.5.y.z,extended,stable] Patch "wake_up_process() should be never used to wakeup a" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Feb. 4, 2013, 9:46 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/218085/
State New
Headers show


Herton Ronaldo Krzesinski - Feb. 4, 2013, 9:46 p.m.
This is a note to let you know that I have just added a patch titled

    wake_up_process() should be never used to wakeup a

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 6b2a5894ed6eaa524d3b60846dee7a7cb931c8b4 Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <>
Date: Mon, 21 Jan 2013 20:48:17 +0100
Subject: [PATCH] wake_up_process() should be never used to wakeup a

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 <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Herton Ronaldo Krzesinski <>
 kernel/sched/core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9f81a3a..3231df8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1686,7 +1686,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);