]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: don't close the mainloop, simply remove the handler 3507/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 6 Aug 2020 12:14:10 +0000 (14:14 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 6 Aug 2020 12:14:10 +0000 (14:14 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/seccomp.c

index 011e5748753e99f8a90b5e8d9c920b5778898f50..ad1f51922be02a0d5df1d4527edf73fa4ee58805 100644 (file)
@@ -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);