diff options
author | Julia Kartseva <hex@fb.com> | 2021-11-04 18:52:02 -0700 |
---|---|---|
committer | Julia Kartseva <hex@fb.com> | 2021-11-10 21:00:25 -0800 |
commit | 084d0849fc864b0377551b211def7a89b642c5e9 (patch) | |
tree | 0181bf3ed82d01aee639a0a6669f611b0d399863 /src/core/bpf-foreign.c | |
parent | a704137c20fcde3fa9077832d9ee29b89d6217e5 (diff) | |
download | systemd-084d0849fc864b0377551b211def7a89b642c5e9.tar.gz |
core: fix bpf-foreign cg controller realization
Requiring /sys/fs/bpf path to be a mount point at the moment of cgroup
controllers realization does more harm than good, because:
* Realization happens early on boot, the mount point may not be ready at
the time. That happens if mounts are made by a .mount unit (the issue we
encountered).
* BPF filesystem may be mounted on another point.
Remove the check. Instead verify that path provided by BPFProgram= is
within BPF fs when unit properties are parsed.
Split in two commits for simple backport.
Diffstat (limited to 'src/core/bpf-foreign.c')
-rw-r--r-- | src/core/bpf-foreign.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/core/bpf-foreign.c b/src/core/bpf-foreign.c index 6b93b9785f..686c14ce1f 100644 --- a/src/core/bpf-foreign.c +++ b/src/core/bpf-foreign.c @@ -111,16 +111,6 @@ static int bpf_foreign_prepare( return 0; } -int bpf_foreign_supported(void) { - int r; - - r = cg_all_unified(); - if (r <= 0) - return r; - - return path_is_mount_point("/sys/fs/bpf", NULL, 0); -} - int bpf_foreign_install(Unit *u) { _cleanup_free_ char *cgroup_path = NULL; CGroupBPFForeignProgram *p; |