Skip to content

Commit 99bdf1e

Browse files
frankQAQ-wangNobody
authored andcommitted
libbpf: Use probe_name for legacy kprobe
Fix a bug in commit 46ed5fc, which wrongly used the func_name instead of probe_name to register legacy kprobe. Fixes: 46ed5fc ("libbpf: Refactor and simplify legacy kprobe code") Reviewed-by: Hengqi Chen <hengqi.chen@gmail.com> Tested-by: Hengqi Chen <hengqi.chen@gmail.com> Co-developed-by: Chengming Zhou <zhouchengming@bytedance.com> Signed-off-by: Qiang Wang <wangqiang.wq.frank@bytedance.com> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
1 parent 7f77596 commit 99bdf1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/libbpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10017,7 +10017,7 @@ bpf_program__attach_kprobe_opts(const struct bpf_program *prog,
1001710017
gen_kprobe_legacy_event_name(probe_name, sizeof(probe_name),
1001810018
func_name, offset);
1001910019

10020-
legacy_probe = strdup(func_name);
10020+
legacy_probe = strdup(probe_name);
1002110021
if (!legacy_probe)
1002210022
return libbpf_err_ptr(-ENOMEM);
1002310023

0 commit comments

Comments
 (0)