Commit 18442cf2 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

__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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 442a10cf
...@@ -909,8 +909,7 @@ __group_complete_signal(int sig, struct task_struct *p) ...@@ -909,8 +909,7 @@ __group_complete_signal(int sig, struct task_struct *p)
do { do {
sigaddset(&t->pending.signal, SIGKILL); sigaddset(&t->pending.signal, SIGKILL);
signal_wake_up(t, 1); signal_wake_up(t, 1);
t = next_thread(t); } while_each_thread(p, t);
} while (t != p);
return; return;
} }
...@@ -928,13 +927,11 @@ __group_complete_signal(int sig, struct task_struct *p) ...@@ -928,13 +927,11 @@ __group_complete_signal(int sig, struct task_struct *p)
rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending); rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending);
p->signal->group_stop_count = 0; p->signal->group_stop_count = 0;
p->signal->group_exit_task = t; p->signal->group_exit_task = t;
t = p; p = t;
do { do {
p->signal->group_stop_count++; p->signal->group_stop_count++;
signal_wake_up(t, 0); signal_wake_up(t, t == p);
t = next_thread(t); } while_each_thread(p, t);
} while (t != p);
wake_up_process(p->signal->group_exit_task);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment