]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Fix double thread join in uprobe_multi_test
authorIhor Solodrai <ihor.solodrai@linux.dev>
Mon, 23 Feb 2026 19:07:30 +0000 (11:07 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 16:19:49 +0000 (08:19 -0800)
commit68b8bea1eec392aa50736a859b8f1418067a3bc4
tree2d968bb6220eba791adb5ccab8b575a93aa4a14a
parentf7ac552be7f13e834a942f64b1ac87e7755b32f4
selftests/bpf: Fix double thread join in uprobe_multi_test

ASAN reported a "joining already joined thread" error. The
release_child() may be called multiple times for the same struct
child.

Fix by resetting child->thread to 0 after pthread_join.

Also memset(0) static child variable in test_attach_api().

Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260223190736.649171-15-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c