Re: [PATCH 2/4] tracing: tprobe-events: Support multiple tprobes on the same tracepoint
From: Google
Date: Sat Mar 29 2025 - 09:35:52 EST
On Wed, 26 Mar 2025 07:08:09 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
> > > + /* tpoint can be NULL, but we don't care here. */
> > > +
> > > + /* Search existing tracepoint_user */
> > > + for_each_trace_fprobe(tf, dpos) {
> > > + if (!trace_fprobe_is_tracepoint(tf))
> > > + continue;
> > > + if (!strcmp(tf->symbol, name)) {
> >
> > If the try_module_get() failed, can this every be true?
>
> Ah, that becomes true in the next patch. In this patch, it should
> not be true.
No, I was wrong. Even if the try_module_get() failed, tracepoint_user
is allocated anyway (with tpoint = NULL). Thus this can be true.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>