]> git.ipfire.org Git - thirdparty/systemd.git/commit
service: do fine-grained validation of CPUSchedulingPriority= at execution time
authorLuca Boccassi <bluca@debian.org>
Wed, 19 Oct 2022 22:52:58 +0000 (23:52 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 12:29:45 +0000 (14:29 +0200)
commit40c05a34595ed769ce676206f3c5de874f9a9234
treea14cc9cffe994d15b887048ab4fbc183798ef12f
parent1726ce726f1a317e6badab5e22fa7ea0afb75b8e
service: do fine-grained validation of CPUSchedulingPriority= at execution time

The precise bounds of the scheduling priority depend on the scheduling policy,
so depending on the order in which the two settings are specified the
validation might pass or fail.
When checking the setting only validate the outer range (valid values in general are 0 to 99),
and let the execution fail later if the priority does not match the
specified policy (1 to 99 for RR/FIFO, 0 for the rest).

Fixes https://github.com/systemd/systemd/issues/20320
src/core/dbus-execute.c
src/core/load-fragment.c
test/units/sched_rr_bad.service
test/units/sched_rr_change.service