diff options
author | Roland McGrath <roland@redhat.com> | 2005-09-29 17:54:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-29 18:20:47 -0400 |
commit | 5acbc5cb507e6c381b70093b1081854708e82b16 (patch) | |
tree | 504bf5b1a1079fedd424d130589a336745f803e9 /kernel/signal.c | |
parent | 4a8342d233a39ee582e9f7260e12d2f5fd194a05 (diff) |
[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>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 5a274705ba19..619b027e92b5 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1763,7 +1763,8 @@ do_signal_stop(int signr) | |||
1763 | * stop is always done with the siglock held, | 1763 | * stop is always done with the siglock held, |
1764 | * so this check has no races. | 1764 | * so this check has no races. |
1765 | */ | 1765 | */ |
1766 | if (t->state < TASK_STOPPED) { | 1766 | if (!t->exit_state && |
1767 | !(t->state & (TASK_STOPPED|TASK_TRACED))) { | ||
1767 | stop_count++; | 1768 | stop_count++; |
1768 | signal_wake_up(t, 0); | 1769 | signal_wake_up(t, 0); |
1769 | } | 1770 | } |