Commit 7398e7f
committed
cgroup: Homogenize cgroup_get_from_id() return value
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2077665
commit fa7e439
Author: Michal Koutný <mkoutny@suse.com>
Date: Fri, 26 Aug 2022 18:52:37 +0200
cgroup: Homogenize cgroup_get_from_id() return value
Cgroup id is user provided datum hence extend its return domain to
include possible error reason (similar to cgroup_get_from_fd()).
This change also fixes commit d4ccaf5 ("bpf: Introduce cgroup
iter") that would use NULL instead of proper error handling in
d4ccaf5 ("bpf: Introduce cgroup iter").
Additionally, neither of: fc_appid_store, bpf_iter_attach_cgroup,
mem_cgroup_get_from_ino (callers of cgroup_get_from_fd) is built without
CONFIG_CGROUPS (depends via CONFIG_BLK_CGROUP, direct, transitive
CONFIG_MEMCG respectively) transitive, so drop the singular definition
not needed with !CONFIG_CGROUPS.
Fixes: d4ccaf5 ("bpf: Introduce cgroup iter")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 5f4c90d commit 7398e7f
File tree
4 files changed
+6
-11
lines changed- block
- include/linux
- kernel/cgroup
- mm
4 files changed
+6
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | 755 | | |
761 | 756 | | |
762 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6020 | 6020 | | |
6021 | 6021 | | |
6022 | 6022 | | |
6023 | | - | |
| 6023 | + | |
6024 | 6024 | | |
6025 | 6025 | | |
6026 | 6026 | | |
| |||
6056 | 6056 | | |
6057 | 6057 | | |
6058 | 6058 | | |
6059 | | - | |
| 6059 | + | |
6060 | 6060 | | |
6061 | 6061 | | |
6062 | 6062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5146 | 5146 | | |
5147 | 5147 | | |
5148 | 5148 | | |
5149 | | - | |
5150 | | - | |
| 5149 | + | |
| 5150 | + | |
5151 | 5151 | | |
5152 | 5152 | | |
5153 | 5153 | | |
| |||
0 commit comments