diff options
author | Jiri Olsa <jolsa@kernel.org> | 2022-10-25 15:41:44 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-10-25 10:14:51 -0700 |
commit | e22061b2d3095c12f90336479f24bf5eeb70e1bd (patch) | |
tree | cb0ec4b822236b0420acf25609b21f0202767cc9 /scripts/bpf_doc.py | |
parent | 1a1b0716d36d21f8448bd7d3f1c0ade7230bb294 (diff) |
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 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions