diff options
| author | Artem Savkov <[email protected]> | 2024-01-10 08:57:37 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-01-23 22:40:23 +0000 |
| commit | d177c1be06ce28aa8c8710ac55be1b5ad3f314c6 (patch) | |
| tree | ab822b88b22a6f8892eda0a9752092fedb63bf3a /tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c | |
| parent | bpftool: Silence build warning about calloc() (diff) | |
| download | kernel-d177c1be06ce28aa8c8710ac55be1b5ad3f314c6.tar.gz kernel-d177c1be06ce28aa8c8710ac55be1b5ad3f314c6.zip | |
selftests/bpf: Fix potential premature unload in bpf_testmod
It is possible for bpf_kfunc_call_test_release() to be called from
bpf_map_free_deferred() when bpf_testmod is already unloaded and
perf_test_stuct.cnt which it tries to decrease is no longer in memory.
This patch tries to fix the issue by waiting for all references to be
dropped in bpf_testmod_exit().
The issue can be triggered by running 'test_progs -t map_kptr' in 6.5,
but is obscured in 6.6 by d119357d07435 ("rcu-tasks: Treat only
synchronous grace periods urgently").
Fixes: 65eb006d85a2 ("bpf: Move kernel test kfuncs to bpf_testmod")
Signed-off-by: Artem Savkov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c')
0 files changed, 0 insertions, 0 deletions
