From: Oleg Nesterov <oleg@redhat.com>
To: syzbot <syzbot@kernel.org>
Cc: syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org,
adrianhuang0701@gmail.com, akpm@linux-foundation.org,
brauner@kernel.org, kexinsun@smail.nju.edu.cn,
peterz@infradead.org, syzbot@lists.linux.dev, tglx@kernel.org
Subject: Re: [PATCH] signal: clear JOBCTL_PENDING_MASK for caller in zap_other_threads()
Date: Thu, 21 May 2026 14:22:32 +0200 [thread overview]
Message-ID: <ag75CP90p87ssRsI@redhat.com> (raw)
In-Reply-To: <36638f2b-6f91-4e33-b630-fd7045eebc84@mail.kernel.org>
On 05/21, syzbot wrote:
>
> When a multi-threaded process receives a stop signal (e.g., SIGSTOP),
> do_signal_stop() sets JOBCTL_STOP_PENDING and JOBCTL_STOP_CONSUME on all
> threads and sets signal->group_stop_count to the number of threads. If
> one of the threads concurrently calls execve(), de_thread() invokes
> zap_other_threads() to kill all other threads. zap_other_threads()
> aborts the pending group stop by resetting signal->group_stop_count to 0
> and clears the JOBCTL_PENDING_MASK for all other threads. However, it
> fails to clear the job control flags for the calling thread.
Yes...
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -1338,6 +1338,7 @@ int zap_other_threads(struct task_struct *p)
> int count = 0;
>
> p->signal->group_stop_count = 0;
> + task_clear_jobctl_pending(p, JOBCTL_PENDING_MASK);
OK, fair enough...
If we reset ->group_stop_count, we need to clear JOBCTL_PENDING_MASK for
every thread.
Acked-by: Oleg Nesterov <oleg@redhat.com>
-----------------------------------------------------------------------
But. It seems that we need more fixes (and more discussions) about the
SIGSTOP with exec race...
Oleg.
next prev parent reply other threads:[~2026-05-21 12:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 9:05 [PATCH] signal: clear JOBCTL_PENDING_MASK for caller in zap_other_threads() syzbot
2026-05-21 12:22 ` Oleg Nesterov [this message]
2026-05-21 12:40 ` Christian Brauner
2026-05-21 13:03 ` Aleksandr Nogikh
2026-05-21 13:17 ` Christian Brauner
2026-05-21 14:32 ` Aleksandr Nogikh
2026-05-21 14:17 ` Greg Kroah-Hartman
2026-05-21 14:30 ` Aleksandr Nogikh
2026-05-21 15:00 ` Greg Kroah-Hartman
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=ag75CP90p87ssRsI@redhat.com \
--to=oleg@redhat.com \
--cc=adrianhuang0701@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=kexinsun@smail.nju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=syzbot@kernel.org \
--cc=syzbot@lists.linux.dev \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@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