]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Panic on most epoll_ctl() failures
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Mar 2019 10:34:29 +0000 (12:34 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 21 Mar 2019 08:03:04 +0000 (10:03 +0200)
Anything except ENOSPC or ENOMEM points to a bug in code. Getting core dump
from those helps debugging.

src/lib/ioloop-epoll.c

index 0fef61e04ba80a54731128186e3ab8a6f1167c69..ae4ee4a375a18e94ff755e1e860c4b8ed050e393 100644 (file)
@@ -145,7 +145,7 @@ void io_loop_handle_remove(struct io_file *io, bool closed)
                        const char *errstr = t_strdup_printf(
                                "epoll_ctl(%s, %d) failed: %m",
                                op == EPOLL_CTL_DEL ? "del" : "mod", io->fd);
-                       if (errno == EBADF)
+                       if (errno != ENOSPC && errno != ENOMEM)
                                i_panic("%s", errstr);
                        else
                                i_error("%s", errstr);