]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/bpf-firewall: replace unnecessary unit_setup_cgroup_runtime() with unit_get_cgro... 39094/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 23 Sep 2025 19:45:21 +0000 (04:45 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 26 Sep 2025 00:28:12 +0000 (09:28 +0900)
commite8a5cda4714fc6fe622a03cfca6c75888d63e354
treef76925807a020afdf8dafcc60ba3cef4001ce87d
parent13b0e7fc6d2623800ba04b104f3b628388c9f5e6
core/bpf-firewall: replace unnecessary unit_setup_cgroup_runtime() with unit_get_cgroup_runtime()

Except for the test, bpf_firewall_compile() is only called by the following:
  cgroup_context_apply() -> cgroup_apply_firewall() -> bpf_firewall_compile()
and in the early stage of cgroup_context_apply(), it checks if the cgroup
runtime exists. Hence, it is not necessary to try to allocate the
runtime in bpf_firewall_compile().
src/core/bpf-firewall.c
src/test/test-bpf-firewall.c