Skip to content

Commit 656be28

Browse files
btw616jmberg-intel
authored andcommitted
um: Handle SIGCHLD in seccomp mode like other IRQ signals
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>
1 parent f68b2d5 commit 656be28

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/um/os-Linux/signal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <as-layout.h>
1717
#include <kern_util.h>
1818
#include <os.h>
19+
#include <skas.h>
1920
#include <sysdep/mcontext.h>
2021
#include <um_malloc.h>
2122
#include <sys/ucontext.h>
@@ -224,6 +225,8 @@ void set_handler(int sig)
224225
sigaddset(&action.sa_mask, SIGIO);
225226
sigaddset(&action.sa_mask, SIGWINCH);
226227
sigaddset(&action.sa_mask, SIGALRM);
228+
if (using_seccomp)
229+
sigaddset(&action.sa_mask, SIGCHLD);
227230

228231
if (sig == SIGSEGV)
229232
flags |= SA_NODEFER;

0 commit comments

Comments
 (0)