summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2022-10-25 16:41:44 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-10-25 20:14:51 +0300
commite22061b2d3095c12f90336479f24bf5eeb70e1bd (patch)
treecb0ec4b822236b0420acf25609b21f0202767cc9 /tools/testing/selftests
parent1a1b0716d36d21f8448bd7d3f1c0ade7230bb294 (diff)
downloadlinux-e22061b2d3095c12f90336479f24bf5eeb70e1bd.tar.xz
bpf: Take module reference on kprobe_multi link
Currently we allow to create kprobe multi link on function from kernel module, but we don't take the module reference to ensure it's not unloaded while we are tracing it. The multi kprobe link is based on fprobe/ftrace layer which takes different approach and releases ftrace hooks when module is unloaded even if there's tracer registered on top of it. Adding code that gathers all the related modules for the link and takes their references before it's attached. All kernel module references are released after link is unregistered. Note that we do it the same way already for trampoline probes (but for single address). Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20221025134148.3300700-5-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions