]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/exec-invoke: pass "/" instead of "" for cgroup root
authorMike Yuan <me@yhndnzj.com>
Sun, 6 Jul 2025 18:50:38 +0000 (20:50 +0200)
committerMike Yuan <me@yhndnzj.com>
Sat, 12 Jul 2025 15:32:32 +0000 (17:32 +0200)
src/core/exec-invoke.c

index 771308848a90f79096e7ba6c6b45e05d54b76cbe..6058553aac8eb6fe188b82ab46454551af8235d9 100644 (file)
@@ -5552,7 +5552,7 @@ int exec_invoke(
                                  * memory_pressure_path != NULL in the conditional below. */
                                 if (memory_pressure_path && needs_sandboxing && exec_needs_cgroup_namespace(context)) {
                                         memory_pressure_path = mfree(memory_pressure_path);
-                                        r = cg_get_path("memory", "", "memory.pressure", &memory_pressure_path);
+                                        r = cg_get_path("memory", "/", "memory.pressure", &memory_pressure_path);
                                         if (r < 0) {
                                                 *exit_status = EXIT_MEMORY;
                                                 return log_oom();