From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Divya Indi <divya.indi@oracle.com>
Subject: Re: [PATCH] tracing: Decrement trace_array when bootconfig creates an instance
Date: Fri, 24 Jan 2020 21:25:31 -0500 [thread overview]
Message-ID: <20200124212531.4dc23b8c@rorschach.local.home> (raw)
In-Reply-To: <20200125112300.220f1728f6e47f45717ec564@kernel.org>
On Sat, 25 Jan 2020 11:23:00 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Fri, 24 Jan 2020 20:59:27 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> >
> > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> >
> > The trace_array_get_by_name() creates a ftrace instance and
> > trace_array_put() is used to remove the reference. Even though the
> > trace_array_get_by_name() creates the instance, it also adds a reference
> > count to it, that prevents user space from removing it.
> >
> > As the bootconfig just creates the instance on boot up, it should still be
> > used where it can be deleted by user space after boot. A trace_array_put()
> > is required to let that happen. Otherwise, the created instance can not
> > be removed.
> >
> > Also, change the documentation on trace_array_get_by_name() to make this not
> > be so confusing.
>
> Good catch! I misunderstood trace_array_put() would remove the instance.
I figured as much, which is why I included the documentation update.
>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
-- Steve
prev parent reply other threads:[~2020-01-25 2:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 1:59 Steven Rostedt
2020-01-25 2:23 ` Masami Hiramatsu
2020-01-25 2:25 ` Steven Rostedt [this message]
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=20200124212531.4dc23b8c@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=divya.indi@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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 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®