diff --git a/src/core/manager.c b/src/core/manager.c index 4b215a6176..a1d6f7cc10 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2387,6 +2387,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t n = recvmsg_safe(m->notify_fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC|MSG_TRUNC); if (IN_SET(n, -EAGAIN, -EINTR)) return 0; /* Spurious wakeup, try again */ + if (n == -EXFULL) { + log_warning("Got message with truncated control data (too many fds sent?), ignoring."); + return 0; + } if (n < 0) /* If this is any other, real error, then let's stop processing this socket. This of course * means we won't take notification messages anymore, but that's still better than busy diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 75cefe8414..a564b95d85 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3995,6 +3995,10 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (IN_SET(n, -EAGAIN, -EINTR)) return 0; + if (n == -EXFULL) { + log_warning("Got message with truncated control data (too many fds sent?), ignoring."); + return 0; + } if (n < 0) return log_warning_errno(n, "Couldn't read notification socket: %m"); diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index c8ce17ad5b..bd33bdd2c5 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -943,6 +943,10 @@ int ask_password_agent( n = recvmsg_safe(socket_fd, &msghdr, 0); if (IN_SET(n, -EAGAIN, -EINTR)) continue; + if (n == -EXFULL) { + log_debug("Got message with truncated control data, ignoring."); + continue; + } if (n < 0) { r = (int) n; goto finish;