diff --git a/kernel/signal.c b/kernel/signal.c index 4a9d763f8922bf625ea3ea6cfdd5e1e79ae8f66c..1814e68e4de38297d0fcf1a8d2c1caa6056354d3 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1840,11 +1840,6 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, for (;;) { struct k_sigaction *ka; - - if (unlikely(signal->group_stop_count > 0) && - do_signal_stop(0)) - goto relock; - /* * Tracing can induce an artifical signal and choose sigaction. * The return value in @signr determines the default action, @@ -1856,6 +1851,10 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, if (unlikely(signr != 0)) ka = return_ka; else { + if (unlikely(signal->group_stop_count > 0) && + do_signal_stop(0)) + goto relock; + signr = dequeue_signal(current, ¤t->blocked, info);