From: Christian Brauner Date: Thu, 6 Aug 2020 12:14:10 +0000 (+0200) Subject: seccomp: don't close the mainloop, simply remove the handler X-Git-Tag: lxc-5.0.0~374^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3507%2Fhead;p=thirdparty%2Flxc.git seccomp: don't close the mainloop, simply remove the handler Signed-off-by: Christian Brauner --- diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c index 011e57487..ad1f51922 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -1374,8 +1374,11 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data, char *cookie = conf->seccomp.notifier.cookie; uint64_t req_id; - if (events & EPOLLHUP) - return log_trace(LXC_MAINLOOP_CLOSE, "Syscall supervisee already exited"); + if (events & EPOLLHUP) { + lxc_mainloop_del_handler(descr, fd); + close(fd); + return log_trace(0, "Removing seccomp notifier fd %d", fd); + } memset(req, 0, sizeof(*req)); ret = seccomp_notify_receive(fd, req);