[PATCH 1/2] dequeue_synchronous_signal: use SI_FROMKERNEL()

From: Oleg Nesterov

Date: Sun Apr 26 2026 - 12:21:17 EST


Cosmetic, to make the intent more clear to the reader.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index d65d0fe24bfb..9924489c43a5 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -681,8 +681,8 @@ static int dequeue_synchronous_signal(kernel_siginfo_t *info)
* Return the first 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) &&
+ /* Synchronous signals are always from kernel */
+ if (SI_FROMKERNEL(&q->info) &&
(sigmask(q->info.si_signo) & SYNCHRONOUS_MASK)) {
sync = q;
goto next;
--
2.52.0