]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
um: Handle SIGCHLD in seccomp mode like other IRQ signals
authorTiwei Bie <tiwei.btw@antgroup.com>
Tue, 6 Jan 2026 00:12:28 +0000 (08:12 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 13 Jan 2026 18:39:09 +0000 (19:39 +0100)
In seccomp mode, SIGCHLD serves as the child reaper IRQ. So, let's
handle it in the same way as other IRQ signals, including preventing
them from nesting with each other and allowing interrupted syscalls
to be automatically restarted.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20260106001228.1531146-3-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/os-Linux/signal.c

index de372b936a8041fad5a8176ec05ac27a0f9adcfc..6c993bc8c78eb2b8bb3d4ae77df0f25c08eede2c 100644 (file)
@@ -16,6 +16,7 @@
 #include <as-layout.h>
 #include <kern_util.h>
 #include <os.h>
+#include <skas.h>
 #include <sysdep/mcontext.h>
 #include <um_malloc.h>
 #include <sys/ucontext.h>
@@ -224,6 +225,8 @@ void set_handler(int sig)
        sigaddset(&action.sa_mask, SIGIO);
        sigaddset(&action.sa_mask, SIGWINCH);
        sigaddset(&action.sa_mask, SIGALRM);
+       if (using_seccomp)
+               sigaddset(&action.sa_mask, SIGCHLD);
 
        if (sig == SIGSEGV)
                flags |= SA_NODEFER;