aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/signal.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index f799a054f292..38ea9e2f1831 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -788,37 +788,14 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
788 } else if (sig == SIGCONT) { 788 } else if (sig == SIGCONT) {
789 unsigned int why; 789 unsigned int why;
790 /* 790 /*
791 * Remove all stop signals from all queues, 791 * Remove all stop signals from all queues, wake all threads.
792 * and wake all threads.
793 */ 792 */
794 rm_from_queue(SIG_KERNEL_STOP_MASK, &signal->shared_pending); 793 rm_from_queue(SIG_KERNEL_STOP_MASK, &signal->shared_pending);
795 t = p; 794 t = p;
796 do { 795 do {
797 unsigned int state;
798
799 task_clear_group_stop_pending(t); 796 task_clear_group_stop_pending(t);
800
801 rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending); 797 rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
802 /* 798 wake_up_state(t, __TASK_STOPPED);
803 * If there is a handler for SIGCONT, we must make
804 * sure that no thread returns to user mode before
805 * we post the signal, in case it was the only
806 * thread eligible to run the signal handler--then
807 * it must not do anything between resuming and
808 * running the handler. With the TIF_SIGPENDING
809 * flag set, the thread will pause and acquire the
810 * siglock that we hold now and until we've queued
811 * the pending signal.
812 *
813 * Wake up the stopped thread _after_ setting
814 * TIF_SIGPENDING
815 */
816 state = __TASK_STOPPED;
817 if (sig_user_defined(t, SIGCONT) && !sigismember(&t->blocked, SIGCONT)) {
818 set_tsk_thread_flag(t, TIF_SIGPENDING);
819 state |= TASK_INTERRUPTIBLE;
820 }
821 wake_up_state(t, state);
822 } while_each_thread(p, t); 799 } while_each_thread(p, t);
823 800
824 /* 801 /*