From: Steven Rostedt <rostedt@goodmis.org>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: fix event_subsystem ref counting
Date: Mon, 31 Oct 2011 12:14:59 -0400 [thread overview]
Message-ID: <1320077699.4793.5.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1320052062-7846-1-git-send-email-idryomov@gmail.com>
On Mon, 2011-10-31 at 11:07 +0200, Ilya Dryomov wrote:
> Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
> ever being released.
>
> Ref_count was added to keep track of subsystem users, not for counting
> events. Subsystem is created with ref_count = 1, so there is no need to
> increment it for every event, we have nr_events for that. Fix this by
> touching ref_count only when we actually have a new user -
> subsystem_open().
Good catch, I'll pull this in.
Thanks!
-- Steve
>
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
> ---
> kernel/trace/trace_events.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 581876f..c212a7f 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -1078,7 +1078,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
> /* First see if we did not already create this dir */
> list_for_each_entry(system, &event_subsystems, list) {
> if (strcmp(system->name, name) == 0) {
> - __get_system(system);
> system->nr_events++;
> return system->entry;
> }
next prev parent reply other threads:[~2011-10-31 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 9:07 Ilya Dryomov
2011-10-31 16:14 ` Steven Rostedt [this message]
2011-11-01 1:12 ` Li Zefan
2011-11-01 1:38 ` Steven Rostedt
2011-11-18 23:04 ` [tip:perf/core] " tip-bot for Ilya Dryomov
2011-12-06 6:25 ` tip-bot for Ilya Dryomov
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=1320077699.4793.5.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.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®