mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 05:45:09 +07:00
d6f1837107
The test_progs subtests, test_spin_lock() and test_map_lock(), requires BTF present to run successfully. Currently, when BTF failed to load, test_progs will segfault, $ ./test_progs ... 12: (bf) r1 = r8 13: (85) call bpf_spin_lock#93 map 'hash_map' has to have BTF in order to use bpf_spin_lock libbpf: -- END LOG -- libbpf: failed to load program 'map_lock_demo' libbpf: failed to load object './test_map_lock.o' test_map_lock:bpf_prog_load errno 13 Segmentation fault The segfault is caused by uninitialized variable "obj", which is used in bpf_object__close(obj), when bpf prog failed to load. Initializing variable "obj" to NULL in two occasions fixed the problem. $ ./test_progs ... Summary: 219 PASSED, 2 FAILED Fixes: |
||
---|---|---|
.. | ||
.gitignore | ||
bpf_obj_id.c | ||
flow_dissector.c | ||
get_stack_raw_tp.c | ||
l4lb_all.c | ||
map_lock.c | ||
obj_name.c | ||
pkt_access.c | ||
pkt_md_access.c | ||
prog_run_xattr.c | ||
queue_stack_map.c | ||
reference_tracking.c | ||
signal_pending.c | ||
spinlock.c | ||
stacktrace_build_id_nmi.c | ||
stacktrace_build_id.c | ||
stacktrace_map_raw_tp.c | ||
stacktrace_map.c | ||
task_fd_query_rawtp.c | ||
task_fd_query_tp.c | ||
tcp_estats.c | ||
tp_attach_query.c | ||
xdp_adjust_tail.c | ||
xdp_noinline.c | ||
xdp.c |