From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dequeue_synchronous_signal: use SI_FROMKERNEL()
Date: Sun, 26 Apr 2026 18:21:00 +0200 [thread overview]
Message-ID: <ae47bBSixfPpkQBm@redhat.com> (raw)
Cosmetic, to make the intent more clear to the reader.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
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
next reply other threads:[~2026-04-26 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-26 16:21 Oleg Nesterov [this message]
2026-04-26 16:21 ` [PATCH 2/2] dequeue_synchronous_signal: kill the unnecessary still-pending check Oleg Nesterov
2026-04-26 19:27 ` Andrew Morton
2026-04-27 11:34 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae47bBSixfPpkQBm@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox