[PATCH] Fix task state testing properly in do_signal_stop()

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>

authored by Roland McGrath and committed by Linus Torvalds 5acbc5cb 4a8342d2

+2 -1
+2 -1
kernel/signal.c
··· 1763 * stop is always done with the siglock held, 1764 * so this check has no races. 1765 */ 1766 - if (t->state < TASK_STOPPED) { 1767 stop_count++; 1768 signal_wake_up(t, 0); 1769 }
··· 1763 * stop is always done with the siglock held, 1764 * so this check has no races. 1765 */ 1766 + if (!t->exit_state && 1767 + !(t->state & (TASK_STOPPED|TASK_TRACED))) { 1768 stop_count++; 1769 signal_wake_up(t, 0); 1770 }