This is a note to let you know that I've just added the patch titled

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

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
wake_up_process-should-be-never-used-to-wakeup-a-task_stopped-traced-task.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Fri Mar  1 09:06:11 2013
From: Oleg Nesterov <[email protected]>
Date: Tue, 19 Feb 2013 14:56:53 +0100
Subject: wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED 
task
To: [email protected]
Cc: Oleg Nesterov <[email protected]>, Linus Torvalds 
<[email protected]>
Message-ID: <[email protected]>


From: Oleg Nesterov <[email protected]>

Upstream commit 9067ac85d533651b98c2ff903182a20cbb361fcb.

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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 kernel/sched.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2778,7 +2778,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);
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.0/ptrace-introduce-signal_wake_up_state-and-ptrace_signal_wake_up.patch
queue-3.0/ptrace-ensure-arch_ptrace-ptrace_request-can-never-race-with-sigkill.patch
queue-3.0/wake_up_process-should-be-never-used-to-wakeup-a-task_stopped-traced-task.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to