diff options
| author | Tejun Heo <tj@kernel.org> | 2024-06-18 10:09:16 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2024-06-18 10:09:16 -1000 |
| commit | 304b3f2bc07ba7c74a1ebc7917a8f0549e6b8d54 (patch) | |
| tree | 582484f486f8bfb72c9d02c59f9fe5eb3e63b3bd /scripts/gdb/linux | |
| parent | df268382adc1f7aa3ad92f7de71b70395f24e4e7 (diff) | |
sched: Allow sched_cgroup_fork() to fail and introduce sched_cancel_fork()
A new BPF extensible sched_class will need more control over the forking
process. It wants to be able to fail from sched_cgroup_fork() after the new
task's sched_task_group is initialized so that the loaded BPF program can
prepare the task with its cgroup association is established and reject fork
if e.g. allocation fails.
Allow sched_cgroup_fork() to fail by making it return int instead of void
and adding sched_cancel_fork() to undo sched_fork() in the error path.
sched_cgroup_fork() doesn't fail yet and this patch shouldn't cause any
behavior changes.
v2: Patch description updated to detail the expected use.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: David Vernet <dvernet@meta.com>
Acked-by: Josh Don <joshdon@google.com>
Acked-by: Hao Luo <haoluo@google.com>
Acked-by: Barret Rhoden <brho@google.com>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions
