aboutsummaryrefslogtreecommitdiff
path: root/tools/spi
diff options
context:
space:
mode:
authorGravatar Yauheni Kaliuta <yauheni.kaliuta@redhat.com> 2020-08-20 14:58:43 +0300
committerGravatar Alexei Starovoitov <ast@kernel.org> 2020-08-20 14:31:14 -0700
commitc210773d6c6f595f5922d56b7391fe343bc7310e (patch)
treed62c557e148a44a174ca14b55b6efd552ec0b39c /tools/spi
parentbpf: xdp: Fix XDP mode when no mode flags specified (diff)
downloadlinux-c210773d6c6f595f5922d56b7391fe343bc7310e.tar.gz
linux-c210773d6c6f595f5922d56b7391fe343bc7310e.tar.bz2
linux-c210773d6c6f595f5922d56b7391fe343bc7310e.zip
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. 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
Diffstat (limited to 'tools/spi')
0 files changed, 0 insertions, 0 deletions