samples, selftests/bpf: add NULL check for ksym_search
Since, ksym_search added with verification logic for symbols existence, it could return NULL when the kernel symbols are not loaded. This commit will add NULL check logic after ksym_search. Signed-off-by:Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- samples/bpf/offwaketime_user.c 5 additions, 0 deletionssamples/bpf/offwaketime_user.c
- samples/bpf/sampleip_user.c 5 additions, 0 deletionssamples/bpf/sampleip_user.c
- samples/bpf/spintest_user.c 6 additions, 1 deletionsamples/bpf/spintest_user.c
- samples/bpf/trace_event_user.c 5 additions, 0 deletionssamples/bpf/trace_event_user.c
- tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c 2 additions, 2 deletionstools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c
Loading
Please register or sign in to comment