diff options
author | Masami Hiramatsu (Google) <[email protected]> | 2022-05-28 00:55:39 +0900 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2022-06-17 17:40:06 -0400 |
commit | cc72b72073ac982a954d3b43519ca1c28f03c27c (patch) | |
tree | bb9ee7db0041fb4dee12010424a227c85b866d1c /scripts/clang-tools/gen_compile_commands.py | |
parent | b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 (diff) |
tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher()
There is a small chance that get_kretprobe(ri) returns NULL in
kretprobe_dispatcher() when another CPU unregisters the kretprobe
right after __kretprobe_trampoline_handler().
To avoid this issue, kretprobe_dispatcher() checks the get_kretprobe()
return value again. And if it is NULL, it returns soon because that
kretprobe is under unregistering process.
This issue has been introduced when the kretprobe is decoupled
from the struct kretprobe_instance by commit d741bf41d7c7
("kprobes: Remove kretprobe hash"). Before that commit, the
struct kretprob_instance::rp directly points the kretprobe
and it is never be NULL.
Link: https://lkml.kernel.org/r/165366693881.797669.16926184644089588731.stgit@devnote2
Reported-by: Yonghong Song <[email protected]>
Fixes: d741bf41d7c7 ("kprobes: Remove kretprobe hash")
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: bpf <[email protected]>
Cc: Kernel Team <[email protected]>
Cc: [email protected]
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions