]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Fix task state testing properly in do_signal_stop()
authorRoland McGrath <roland@redhat.com>
Thu, 29 Sep 2005 21:54:42 +0000 (14:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Sep 2005 22:20:47 +0000 (15:20 -0700)
Any tests using < TASK_STOPPED or the like are left over from the time
when the TASK_ZOMBIE and TASK_DEAD bits were in the same word, and it
served to check for "stopped or dead".  I think this one in
do_signal_stop is the only such case.  It has been buggy ever since
exit_state was separated, and isn't testing the exit_state value.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/signal.c

index 5a274705ba1945b8ec81100a139daec057fc696d..619b027e92b53ce02706a04f6e4524a6cc1135a8 100644 (file)
@@ -1763,7 +1763,8 @@ do_signal_stop(int signr)
                                 * stop is always done with the siglock held,
                                 * so this check has no races.
                                 */
-                               if (t->state < TASK_STOPPED) {
+                               if (!t->exit_state &&
+                                   !(t->state & (TASK_STOPPED|TASK_TRACED))) {
                                        stop_count++;
                                        signal_wake_up(t, 0);
                                }