libbpf: Use correct return pointer in attach_raw_tp
Jiri Olsa
reviewerPATCH 1/1 libbpf: Use correct return pointer in attach_raw_tp
We need to pass '*link' to final libbpf_get_error, because that one holds the return value, not 'link'.
Fixes 4fa5bcfe07f7 ("libbpf: Allow BPF program auto-attach handlers to bail out")
Signed-off-by Jiri Olsa <[email protected]>
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -11223,7 +11223,7 @@ static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf } *link =bpf_program__attach_raw_tracepoint (prog, tp_name); -return libbpf_get_error (link); +return libbpf_get_error (*link); }/* Common logic for all BPF program types that attach to a btf_id */
Signature · 1 line
2.38.1
This patch was applied to bpf/bpf.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Mon, 14 Nov 2022 15:52:57 +0100 you wrote:
We need to pass '*link' to final
libbpf_get_error, because that one holds the return value, not 'link'.Fixes 4fa5bcfe07f7 ("libbpf: Allow BPF program auto-attach handlers to bail out")Signed-off-by Jiri Olsa <[email protected]>--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [bpf] libbpf: Use correct return pointer in attach_raw_tp
https://git.kernel.org/bpf/bpf/c/5fd2a60aecf3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html