android_kernel_motorola_sm6375/tools/testing
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yauheni Kaliuta e1dbfba32e
UPSTREAM: bpf: selftests: global_funcs: Check err_str before strstr
The error path in libbpf.c:load_program() has calls to pr_warn()
which ends up for global_funcs tests to
test_global_funcs.c:libbpf_debug_print().

For the tests with no struct test_def::err_str initialized with a
string, it causes call of strstr() with NULL as the second argument
and it segfaults.

Fix it by calling strstr() only for non-NULL err_str.

Change-Id: I919e29818dafd5cf35c7e2a8f6216d28c80915f7
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200820115843.39454-1-yauheni.kaliuta@redhat.com
2026-01-14 18:12:46 -08:00
..
fault-injection
ktest ktest.pl: Prevent recursion of default variable options 2025-08-28 16:21:26 +02:00
nvdimm
radix-tree radix tree test suite: fix incorrect allocation size for pthreads 2023-08-16 18:19:23 +02:00
scatterlist
selftests UPSTREAM: bpf: selftests: global_funcs: Check err_str before strstr 2026-01-14 18:12:46 -08:00
vsock