diff options
| author | Liang Luo <luoliang@kylinos.cn> | 2026-07-09 18:03:40 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-07-09 10:56:26 -1000 |
| commit | e655c1f1bd14804f398df7da029c4a7e3f9ccd7f (patch) | |
| tree | 4042ef4916607c6744eca0569db996e1c1b2b18c /tools/perf/scripts/python/bin | |
| parent | f3c6919207ebade88fe40377b6a8b69294b4d35f (diff) | |
selftests/sched_ext: Fix bpf_link leak on early return in prog_run
In prog_run's run(), the bpf_link is attached early but only destroyed
on the success path. The three SCX_EQ assertions between attach and
destroy expand to a direct 'return SCX_TEST_FAIL', so if any of them
triggers, 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.
Convert those assertions to explicit checks that jump to a unified
'out' label which always runs the cleanup, matching the pattern used
in cyclic_kick_wait.c.
Fixes: a5db7817af78 ("sched_ext: Add selftests")
Signed-off-by: Liang Luo <luoliang@kylinos.cn>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
