Blame SOURCES/0331-pid1-fix-DefaultTasksMax-initialization.patch

df9c27
From e809564cfa5af01a26075682d49f81a987c41dd8 Mon Sep 17 00:00:00 2001
df9c27
From: Franck Bui <fbui@suse.com>
df9c27
Date: Wed, 2 Oct 2019 11:58:16 +0200
df9c27
Subject: [PATCH 331/341] pid1: fix DefaultTasksMax initialization
df9c27
df9c27
Otherwise DefaultTasksMax is always set to "inifinity".
df9c27
df9c27
This was broken by fb39af4ce42.
df9c27
df9c27
(cherry picked from commit c0000de87d2c7934cb1f4ba66a533a85277600ff)
df9c27
df9c27
Resolves: #1809037
df9c27
---
df9c27
 src/core/main.c | 4 +---
df9c27
 1 file changed, 1 insertion(+), 3 deletions(-)
df9c27
df9c27
diff --git a/src/core/main.c b/src/core/main.c
df9c27
index d6550ea161..45d09b1e11 100644
df9c27
--- a/src/core/main.c
df9c27
+++ b/src/core/main.c
df9c27
@@ -2088,7 +2088,7 @@ static void reset_arguments(void) {
df9c27
         arg_default_blockio_accounting = false;
df9c27
         arg_default_memory_accounting = MEMORY_ACCOUNTING_DEFAULT;
df9c27
         arg_default_tasks_accounting = true;
df9c27
-        arg_default_tasks_max = UINT64_MAX;
df9c27
+        arg_default_tasks_max = system_tasks_max_scale(DEFAULT_TASKS_MAX_PERCENTAGE, 100U);
df9c27
         arg_machine_id = (sd_id128_t) {};
df9c27
         arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
df9c27
 
df9c27
@@ -2103,8 +2103,6 @@ static int parse_configuration(const struct rlimit *saved_rlimit_nofile,
df9c27
         assert(saved_rlimit_nofile);
df9c27
         assert(saved_rlimit_memlock);
df9c27
 
df9c27
-        arg_default_tasks_max = system_tasks_max_scale(DEFAULT_TASKS_MAX_PERCENTAGE, 100U);
df9c27
-
df9c27
         /* Assign configuration defaults */
df9c27
         reset_arguments();
df9c27
 
df9c27
-- 
df9c27
2.21.1
df9c27