Patch "wake_up_process() should be never used to wakeup a TASK_STOPPED/TRACED task" has been added to the 3.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <stable@xxxxxxxxxxxxxxx> know about it.


>From mhocko@xxxxxxx  Fri Mar  1 09:06:11 2013
From: Oleg Nesterov <oleg@xxxxxxxxxx>
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: stable@xxxxxxxxxxxxxxx
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Message-ID: <1361282213-17268-3-git-send-email-mhocko@xxxxxxx>


From: Oleg Nesterov <oleg@xxxxxxxxxx>

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 <oleg@xxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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 oleg@xxxxxxxxxx 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]