mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: axelrasmussen@google.com, mhiramat@kernel.org,
	dan.carpenter@oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/6] tracing: Rework synthetic event command parsing
Date: Mon, 25 Jan 2021 10:22:07 -0600	[thread overview]
Message-ID: <91c81c68e183f3aaa5c982c5741710788413f0db.camel@kernel.org> (raw)
In-Reply-To: <20210122160052.4b535511@gandalf.local.home>

Hi Steve,

On Fri, 2021-01-22 at 16:00 -0500, Steven Rostedt wrote:
> On Thu, 21 Jan 2021 11:01:05 -0600
> Tom Zanussi <zanussi@kernel.org> wrote:
> 
> > @@ -1208,13 +1173,14 @@ static int __create_synth_event(int argc,
> > const char *name, const char **argv)
> >  	 *      where 'field' = type field_name
> >  	 */
> >  
> > -	if (name[0] == '\0' || argc < 1) {
> > +	mutex_lock(&event_mutex);
> 
> I'm curious, why is the event_mutex taken here? I'm guessing it is
> first
> needed for the find_synth_event() call, in which case, it can be
> moved
> after the is_good_name() check. I don't see why the goto out is
> required
> here or for the is_good_name() check.
> 

Yes, it's for the find_synth_event() call, and yes, it should come
after the is_good_name() check.  I'll move it and fix up the goto
changes as a result.

Thanks,

Tom

> -- Steve
> 
> > +
> > +	if (name[0] == '\0') {
> >  		synth_err(SYNTH_ERR_CMD_INCOMPLETE, 0);
> > -		return -EINVAL;
> > +		ret = -EINVAL;
> > +		goto out;
> >  	}
> >  
> > -	mutex_lock(&event_mutex);
> > -
> >  	if (!is_good_name(name)) {
> >  		synth_err(SYNTH_ERR_BAD_NAME, errpos(name));
> >  		ret = -EINVAL;


  reply	other threads:[~2021-01-25 16:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 17:01 [PATCH v6 0/6] tracing: More synthetic event error fixes Tom Zanussi
2021-01-21 17:01 ` [PATCH v6 1/6] tracing/dynevent: Delegate parsing to create function Tom Zanussi
2021-01-21 17:01 ` [PATCH v6 2/6] tracing: Rework synthetic event command parsing Tom Zanussi
2021-01-22 13:16   ` Masami Hiramatsu
2021-01-25 16:16     ` Tom Zanussi
2021-01-22 21:00   ` Steven Rostedt
2021-01-25 16:22     ` Tom Zanussi [this message]
2021-01-21 17:01 ` [PATCH v6 3/6] tracing: Update synth command errors Tom Zanussi
2021-01-22 13:23   ` Masami Hiramatsu
2021-01-25 16:20     ` Tom Zanussi
2021-01-22 21:06   ` Steven Rostedt
2021-01-21 17:01 ` [PATCH v6 4/6] tracing: Add a backward-compatibility check for synthetic event creation Tom Zanussi
2021-01-22 21:12   ` Steven Rostedt
2021-01-25 16:25     ` Tom Zanussi
2021-01-21 17:01 ` [PATCH v6 5/6] selftests/ftrace: Update synthetic event syntax errors Tom Zanussi
2021-01-21 17:01 ` [PATCH v6 6/6] selftests/ftrace: Add '!event' synthetic event syntax check Tom Zanussi

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=91c81c68e183f3aaa5c982c5741710788413f0db.camel@kernel.org \
    --to=zanussi@kernel.org \
    --cc=axelrasmussen@google.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®