diff options
| author | Cheng-Yang Chou <yphbchou0911@gmail.com> | 2026-05-08 14:55:12 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-08 05:34:39 -1000 |
| commit | e18002d2c791456546505d64f308981f38316ca9 (patch) | |
| tree | ff25bbd348d57ec3748d0a89d339ed5e65e76a8e /include/linux | |
| parent | d91b36de53c563f6f65aa1dea747f9bcb4c56d1d (diff) | |
selftests/sched_ext: Fix select_cpu_dfl link leak on early return
If run() exits early via SCX_EQ/SCX_ASSERT (which calls return
directly), bpf_link__destroy() is never reached and the BPF
scheduler stays loaded. All subsequent tests then fail to attach
because SCX is not in the DISABLED state.
Move bpf_link into a context struct so cleanup() always destroys
it, regardless of how run() exits. Also skip waitpid() for children
where fork() returned -1, avoiding waitpid(-1,...) accidentally
reaping an unrelated child and triggering the early return path.
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
