Lines Matching refs:link_fd
347 int prog_fd, link_fd, err; in probe_perf_link() local
357 link_fd = bpf_link_create(prog_fd, -1, BPF_PERF_EVENT, NULL); in probe_perf_link()
360 if (link_fd >= 0) in probe_perf_link()
361 close(link_fd); in probe_perf_link()
364 return link_fd < 0 && err == -EBADF; in probe_perf_link()
379 int prog_fd, link_fd, err; in probe_uprobe_multi_link() local
392 link_fd = bpf_link_create(prog_fd, -1, BPF_TRACE_UPROBE_MULTI, &link_opts); in probe_uprobe_multi_link()
395 if (link_fd >= 0 || err != -EBADF) { in probe_uprobe_multi_link()
396 if (link_fd >= 0) in probe_uprobe_multi_link()
397 close(link_fd); in probe_uprobe_multi_link()
422 link_fd = bpf_link_create(prog_fd, -1, BPF_TRACE_UPROBE_MULTI, &link_opts); in probe_uprobe_multi_link()
425 if (link_fd >= 0) in probe_uprobe_multi_link()
426 close(link_fd); in probe_uprobe_multi_link()
429 return link_fd < 0 && err == -EINVAL; in probe_uprobe_multi_link()