]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/exec-credential: work around tmpfs reconfigure bug
authorMike Yuan <me@yhndnzj.com>
Sat, 8 Nov 2025 19:26:31 +0000 (20:26 +0100)
committerMike Yuan <me@yhndnzj.com>
Mon, 10 Nov 2025 22:06:14 +0000 (23:06 +0100)
src/core/exec-credential.c

index 632365fbac781512a2cf14ff782deebcfa79fb83..d2b83073694d45485d631bec5e17647b2c0b0b68 100644 (file)
@@ -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;