]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/exec-invoke: Fix missing arguments for PR_SET_MEMORY_MERGE call
authorVasiliy Stelmachenok <ventureo@yandex.ru>
Fri, 8 Mar 2024 14:58:18 +0000 (17:58 +0300)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 9 Mar 2024 00:19:16 +0000 (00:19 +0000)
Without it prctl will always fail, even if using a kernel version that
supports the PR_SET_MEMORY_MERGE call.

src/core/exec-invoke.c

index b1298670c7e44c5194e29387e3cd392592cc1005..91c7d412668c1ba128f47c4db22ae0164ad4a116 100644 (file)
@@ -4733,7 +4733,7 @@ int exec_invoke(
         }
 
         if (context->memory_ksm >= 0)
-                if (prctl(PR_SET_MEMORY_MERGE, context->memory_ksm) < 0) {
+                if (prctl(PR_SET_MEMORY_MERGE, context->memory_ksm, 0, 0, 0) < 0) {
                         if (ERRNO_IS_NOT_SUPPORTED(errno))
                                 log_exec_debug_errno(context,
                                                      params,