All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Gabriele Paoloni <gpaoloni@redhat.com>,
	mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER
Date: Wed, 19 Mar 2025 05:13:17 -0400	[thread overview]
Message-ID: <20250319051317.670ba86c@batman.local.home> (raw)
In-Reply-To: <20250318110700.510f05df7e113180503fc036@kernel.org>

On Tue, 18 Mar 2025 11:07:00 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -790,7 +790,7 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
> >  				clear_bit(EVENT_FILE_FL_RECORDED_TGID_BIT, &file->flags);
> >  			}
> >  
> > -			call->class->reg(call, TRACE_REG_UNREGISTER, file);
> > +			ret = call->class->reg(call, TRACE_REG_UNREGISTER, file);  
> 
> This is not enough. As same as enable failure, this function needs to handle
> this error to report it and break.

Perhaps all we should do here is:

			WARN_ON_ONCE(ret);

-- Steve

  reply	other threads:[~2025-03-19  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 12:57 [RFC PATCH] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER Gabriele Paoloni
2025-03-18  2:07 ` Masami Hiramatsu
2025-03-19  9:13   ` Steven Rostedt [this message]
2025-03-19 16:21     ` Gabriele Paoloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319051317.670ba86c@batman.local.home \
    --to=rostedt@goodmis.org \
    --cc=gpaoloni@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.