aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2007-10-17 02:27:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:51 -0400
commit18442cf28af81378cf8996d264b368bba47cf846 (patch)
treeeb260ade275e939f6a3314bd5cbc538fc0cbad56
parent442a10cf9e1c350b4de4dd6f22c72618a0b13d7f (diff)
__group_complete_signal: eliminate unneeded wakeup of ->group_exit_task
Cleanup. __group_complete_signal() wakes up ->group_exit_task twice. The second wakeup's state includes TASK_UNINTERRUPTIBLE, which is not very appropriate. Change the code to pass the "correct" argument to signal_wake_up() and kill now unneeded wake_up_process(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/signal.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index b7aa492e16ad..90e2efad33ae 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -909,8 +909,7 @@ __group_complete_signal(int sig, struct task_struct *p)
909 do { 909 do {
910 sigaddset(&t->pending.signal, SIGKILL); 910 sigaddset(&t->pending.signal, SIGKILL);
911 signal_wake_up(t, 1); 911 signal_wake_up(t, 1);
912 t = next_thread(t); 912 } while_each_thread(p, t);
913 } while (t != p);
914 return; 913 return;
915 } 914 }
916 915
@@ -928,13 +927,11 @@ __group_complete_signal(int sig, struct task_struct *p)
928 rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending); 927 rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending);
929 p->signal->group_stop_count = 0; 928 p->signal->group_stop_count = 0;
930 p->signal->group_exit_task = t; 929 p->signal->group_exit_task = t;
931 t = p; 930 p = t;
932 do { 931 do {
933 p->signal->group_stop_count++; 932 p->signal->group_stop_count++;
934 signal_wake_up(t, 0); 933 signal_wake_up(t, t == p);
935 t = next_thread(t); 934 } while_each_thread(p, t);
936 } while (t != p);
937 wake_up_process(p->signal->group_exit_task);
938 return; 935 return;
939 } 936 }
940 937