Commit a400d08b authored by Tao Chen's avatar Tao Chen Committed by Alexei Starovoitov
Browse files

libbpf: Fix expected_attach_type set handling in program load callback



Referenced commit broke the logic of resetting expected_attach_type to
zero for allowed program types if kernel doesn't yet support such field.
We do need to overwrite and preserve expected_attach_type for
multi-uprobe though, but that can be done explicitly in
libbpf_prepare_prog_load().

Fixes: 5902da6d ("libbpf: Add uprobe multi link support to bpf_program__attach_usdt")
Suggested-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarTao Chen <chen.dylane@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240925153012.212866-1-chen.dylane@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 8b334d91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment