aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index e9abc69dc0d8..4f7312b49b2d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -254,7 +254,8 @@ static void task_clear_group_stop_trapping(struct task_struct *task)
254 */ 254 */
255void task_clear_group_stop_pending(struct task_struct *task) 255void task_clear_group_stop_pending(struct task_struct *task)
256{ 256{
257 task->group_stop &= ~(GROUP_STOP_PENDING | GROUP_STOP_CONSUME); 257 task->group_stop &= ~(GROUP_STOP_PENDING | GROUP_STOP_CONSUME |
258 GROUP_STOP_DEQUEUED);
258} 259}
259 260
260/** 261/**
@@ -602,7 +603,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
602 * is to alert stop-signal processing code when another 603 * is to alert stop-signal processing code when another
603 * processor has come along and cleared the flag. 604 * processor has come along and cleared the flag.
604 */ 605 */
605 tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; 606 current->group_stop |= GROUP_STOP_DEQUEUED;
606 } 607 }
607 if ((info->si_code & __SI_MASK) == __SI_TIMER && info->si_sys_private) { 608 if ((info->si_code & __SI_MASK) == __SI_TIMER && info->si_sys_private) {
608 /* 609 /*
@@ -821,13 +822,6 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
821 signal->flags = why | SIGNAL_STOP_CONTINUED; 822 signal->flags = why | SIGNAL_STOP_CONTINUED;
822 signal->group_stop_count = 0; 823 signal->group_stop_count = 0;
823 signal->group_exit_code = 0; 824 signal->group_exit_code = 0;
824 } else {
825 /*
826 * We are not stopped, but there could be a stop
827 * signal in the middle of being processed after
828 * being removed from the queue. Clear that too.
829 */
830 signal->flags &= ~SIGNAL_STOP_DEQUEUED;
831 } 825 }
832 } 826 }
833 827
@@ -1855,7 +1849,7 @@ static int do_signal_stop(int signr)
1855 /* signr will be recorded in task->group_stop for retries */ 1849 /* signr will be recorded in task->group_stop for retries */
1856 WARN_ON_ONCE(signr & ~GROUP_STOP_SIGMASK); 1850 WARN_ON_ONCE(signr & ~GROUP_STOP_SIGMASK);
1857 1851
1858 if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED) || 1852 if (!likely(current->group_stop & GROUP_STOP_DEQUEUED) ||
1859 unlikely(signal_group_exit(sig))) 1853 unlikely(signal_group_exit(sig)))
1860 return 0; 1854 return 0;
1861 /* 1855 /*