diff options
author | Martin KaFai Lau <kafai@fb.com> | 2020-10-19 12:42:25 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-10-19 15:57:42 -0700 |
commit | 8568c3cefd5143fa0dc09f90e1bc9dc8905292f4 (patch) | |
tree | 90ff2079a7ea6260ffe6399e1d00f457cabea8cf /scripts/bpf_helpers_doc.py | |
parent | e710bcc6d92c47bb7d8e803b41ef529c09ad6a9e (diff) | |
download | linux-stable-8568c3cefd5143fa0dc09f90e1bc9dc8905292f4.tar.gz linux-stable-8568c3cefd5143fa0dc09f90e1bc9dc8905292f4.tar.bz2 linux-stable-8568c3cefd5143fa0dc09f90e1bc9dc8905292f4.zip |
bpf: selftest: Ensure the return value of the bpf_per_cpu_ptr() must be checked
This patch tests all pointers returned by bpf_per_cpu_ptr() must be
tested for NULL first before it can be accessed.
This patch adds a subtest "null_check", so it moves the ".data..percpu"
existence check to the very beginning and before doing any subtest.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201019194225.1051596-1-kafai@fb.com
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions