Skip to content
Commit ac91052f authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google)
Browse files

tracing: tprobe-events: Fix leakage of module refcount

When enabling the tracepoint at loading module, the target module
refcount is incremented by find_tracepoint_in_module(). But it is
unnecessary because the module is not unloaded while processing
module loading callbacks.
Moreover, the refcount is not decremented in that function.
To be clear the module refcount handling, move the try_module_get()
callsite to trace_fprobe_create_internal(), where it is actually
required.

Link: https://lore.kernel.org/all/174182761071.83274.18334217580449925882.stgit@devnote2/



Fixes: 57a7e6de ("tracing/fprobe: Support raw tracepoints on future loaded modules")
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
parent 0a8bb688
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment