OSDN Git Service

samples, selftests/bpf: add NULL check for ksym_search
authorDaniel T. Lee <danieltimlee@gmail.com>
Wed, 3 Apr 2019 22:17:56 +0000 (07:17 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 4 Apr 2019 14:43:47 +0000 (16:43 +0200)
commite67b2c715415b121339049b630f0b4e1ede888dc
treeead14552f2199aca864d04cdff0afcd23222eaf9
parent0979ff7992fb6f4eb837995b12f4071dcafebd2d
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>
samples/bpf/offwaketime_user.c
samples/bpf/sampleip_user.c
samples/bpf/spintest_user.c
samples/bpf/trace_event_user.c
tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c