Commit b5ad4cd
bpf: Add bpf_task_under_cgroup() kfunc
Add a kfunc that's similar to the bpf_current_task_under_cgroup.
The difference is that it is a designated task.
When hook sched related functions, sometimes it is necessary to
specify a task instead of the current task.
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20230506031545.35991-2-zhoufeng.zf@bytedance.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent f4dea96 commit b5ad4cd
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2149 | 2149 | | |
2150 | 2150 | | |
2151 | 2151 | | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
2152 | 2168 | | |
2153 | 2169 | | |
2154 | 2170 | | |
| |||
2400 | 2416 | | |
2401 | 2417 | | |
2402 | 2418 | | |
| 2419 | + | |
2403 | 2420 | | |
2404 | 2421 | | |
2405 | 2422 | | |
| |||
0 commit comments