mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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: 4fa5bcfe07
("libbpf: Allow BPF program auto-attach handlers to bail out")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221114145257.882322-1-jolsa@kernel.org
This commit is contained in:
parent
ed1fe1bebe
commit
5fd2a60aec
1 changed files with 1 additions and 1 deletions
|
@ -11169,7 +11169,7 @@ static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf
|
||||||
}
|
}
|
||||||
|
|
||||||
*link = bpf_program__attach_raw_tracepoint(prog, tp_name);
|
*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 */
|
/* Common logic for all BPF program types that attach to a btf_id */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue