]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: remove duplicate serialization of `cpu_sched_reset_on_fork`
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 27 Feb 2024 13:28:10 +0000 (14:28 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 27 Feb 2024 19:20:44 +0000 (19:20 +0000)
`c->cpu_sched_reset_on_fork` is serialized using
`exec-context-cpu-sched-reset-on-fork` and
`exec-context-cpu-scheduling-reset-on-fork`. Let's keep only the second one, to
serialize the value only if `cpu_sched_set` is true.

src/core/execute-serialize.c
test/fuzz/fuzz-execute-serialize/initial

index c7cda98ff06b8527701c78ab6e9abd87b0c6f99b..b991dc0bc84ad94dc4feb2bea4e3f791475edd1e 100644 (file)
@@ -1877,10 +1877,6 @@ static int exec_context_serialize(const ExecContext *c, FILE *f) {
         if (r < 0)
                 return r;
 
-        r = serialize_bool_elide(f, "exec-context-cpu-sched-reset-on-fork", c->cpu_sched_reset_on_fork);
-        if (r < 0)
-                return r;
-
         r = serialize_bool(f, "exec-context-ignore-sigpipe", c->ignore_sigpipe);
         if (r < 0)
                 return r;
@@ -2774,11 +2770,6 @@ static int exec_context_deserialize(ExecContext *c, FILE *f) {
                         if (r < 0)
                                 return r;
                         c->same_pgrp = r;
-                } else if ((val = startswith(l, "exec-context-cpu-sched-reset-on-fork="))) {
-                        r = parse_boolean(val);
-                        if (r < 0)
-                                return r;
-                        c->cpu_sched_reset_on_fork = r;
                 } else if ((val = startswith(l, "exec-context-non-blocking="))) {
                         r = parse_boolean(val);
                         if (r < 0)
index 403cf085a4a9c3aae504602e5e74121d9cccd354..4d9103c3aba5047235c8586a9592e9fc63fbb996 100644 (file)
@@ -31,7 +31,6 @@ exec-context-protect-home=
 exec-context-protect-system=
 exec-context-mount-api-vfs=
 exec-context-same-pgrp=
-exec-context-cpu-sched-reset-on-fork=
 exec-context-non-blocking=
 exec-context-ignore-sigpipe=
 exec-context-memory-deny-write-execute=