mirror of
https://github.com/torvalds/linux.git
synced 2026-10-24 16:55:02 +02:00
fork: use SIG_KERNEL_ONLY_MASK for the user worker signal mask
For a user worker copy_process() blocks every signal except for SIGKILL and SIGSTOP. Use SIG_KERNEL_ONLY_MASK instead of open-coding it. No functional changes. Link: https://patch.msgid.link/20260921-work-coredump-fixes-v3-15-8e4adb1619e6@kernel.org Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
1f978881ce
commit
c7de3d02e6
|
|
@ -2140,12 +2140,9 @@ __latent_entropy struct task_struct *copy_process(
|
|||
if (args->kthread)
|
||||
p->flags |= PF_KTHREAD;
|
||||
if (args->user_worker) {
|
||||
/*
|
||||
* Mark us a user worker, and block any signal that isn't
|
||||
* fatal or STOP
|
||||
*/
|
||||
/* A user worker takes only the signals nobody can block. */
|
||||
p->flags |= PF_USER_WORKER;
|
||||
siginitsetinv(&p->blocked, sigmask(SIGKILL)|sigmask(SIGSTOP));
|
||||
siginitsetinv(&p->blocked, SIG_KERNEL_ONLY_MASK);
|
||||
}
|
||||
if (args->io_thread)
|
||||
p->flags |= PF_IO_WORKER;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user