diff options
author | Yosry Ahmed <yosryahmed@google.com> | 2022-10-11 03:33:59 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-10-11 19:50:15 +0300 |
commit | 35256d673a9cf723d9e2edb5d51e1b1b6b197ba3 (patch) | |
tree | fa4fda1d62ac02bf2556e3d9c97d80dcc8fbf6e6 | |
parent | a6d1ce5951185ee91bbe6909fe2758f3625561b0 (diff) | |
download | linux-35256d673a9cf723d9e2edb5d51e1b1b6b197ba3.tar.xz |
bpf: cgroup_iter: support cgroup1 using cgroup fd
Use cgroup_v1v2_get_from_fd() in cgroup_iter to support attaching to
both cgroup v1 and v2 using fds.
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/bpf/cgroup_iter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/cgroup_iter.c b/kernel/bpf/cgroup_iter.c index 0d200a993489..9fcf09f2ef00 100644 --- a/kernel/bpf/cgroup_iter.c +++ b/kernel/bpf/cgroup_iter.c @@ -196,7 +196,7 @@ static int bpf_iter_attach_cgroup(struct bpf_prog *prog, return -EINVAL; if (fd) - cgrp = cgroup_get_from_fd(fd); + cgrp = cgroup_v1v2_get_from_fd(fd); else if (id) cgrp = cgroup_get_from_id(id); else /* walk the entire hierarchy by default. */ |