From: Mike Yuan Date: Sat, 8 Nov 2025 19:26:31 +0000 (+0100) Subject: core/exec-credential: work around tmpfs reconfigure bug X-Git-Tag: v259-rc1~92^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44f23805b083108cb7524fb0558dba04c1ac692f;p=thirdparty%2Fsystemd.git core/exec-credential: work around tmpfs reconfigure bug --- diff --git a/src/core/exec-credential.c b/src/core/exec-credential.c index 632365fbac7..d2b83073694 100644 --- a/src/core/exec-credential.c +++ b/src/core/exec-credential.c @@ -1065,6 +1065,11 @@ static int setup_credentials_internal( if (r < 0) return log_debug_errno(r, "Failed to adjust ACLs of credentials dir: %m"); + // Work around a kernel bug that results in tmpfs reconfiguration failure. + // FIXME: drop this once https://lore.kernel.org/linux-fsdevel/20251108190930.440685-1-me@yhndnzj.com/ + // is merged and hits the distro kernels. + (void) fsconfig(fs_fd, FSCONFIG_SET_FLAG, "noswap", NULL, 0); + if (fsconfig(fs_fd, FSCONFIG_SET_FLAG, "ro", NULL, 0) < 0) return -errno;