]> www.infradead.org Git - users/hch/misc.git/commit
tracing: fprobe: Cleanup fprobe hash when module unloading
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 31 Mar 2025 15:35:44 +0000 (00:35 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 7 Apr 2025 23:46:25 +0000 (08:46 +0900)
commita3dc2983ca7b90fd35f978502de6d4664d965cfb
tree96d598333810f970226e084a0e0129dab1f59dcd
parentdd941507a9486252d6fcf11814387666792020f3
tracing: fprobe: Cleanup fprobe hash when module unloading

Cleanup fprobe address hash table on module unloading because the
target symbols will be disappeared when unloading module and not
sure the same symbol is mapped on the same address.

Note that this is at least disables the fprobes if a part of target
symbols on the unloaded modules. Unlike kprobes, fprobe does not
re-enable the probe point by itself. To do that, the caller should
take care register/unregister fprobe when loading/unloading modules.
This simplifies the fprobe state managememt related to the module
loading/unloading.

Link: https://lore.kernel.org/all/174343534473.843280.13988101014957210732.stgit@devnote2/
Fixes: 4346ba160409 ("fprobe: Rewrite fprobe on function-graph tracer")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/fprobe.c