From 532de87f74478c110e53057cad946f6b994ca249 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Tue, 27 Feb 2024 14:28:10 +0100 Subject: [PATCH] core: remove duplicate serialization of `cpu_sched_reset_on_fork` `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 | 9 --------- test/fuzz/fuzz-execute-serialize/initial | 1 - 2 files changed, 10 deletions(-) diff --git a/src/core/execute-serialize.c b/src/core/execute-serialize.c index c7cda98ff06..b991dc0bc84 100644 --- a/src/core/execute-serialize.c +++ b/src/core/execute-serialize.c @@ -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) diff --git a/test/fuzz/fuzz-execute-serialize/initial b/test/fuzz/fuzz-execute-serialize/initial index 403cf085a4a..4d9103c3aba 100644 --- a/test/fuzz/fuzz-execute-serialize/initial +++ b/test/fuzz/fuzz-execute-serialize/initial @@ -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= -- 2.47.3