diff --git a/kernel/signal.c b/kernel/signal.c index cb6ec7054eee..dd770e68faee 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -684,12 +684,13 @@ static int dequeue_synchronous_signal(kernel_siginfo_t *info) return 0; /* - * Return the first synchronous signal in the queue. + * Return the first unblocked synchronous signal in the queue. */ list_for_each_entry(q, &pending->list, list) { /* Synchronous signals have a positive si_code */ if ((q->info.si_code > SI_USER) && - (sigmask(q->info.si_signo) & SYNCHRONOUS_MASK)) { + (sigmask(q->info.si_signo) & SYNCHRONOUS_MASK) && + !sigismember(&tsk->blocked, q->info.si_signo)) { sync = q; goto next; }