From: Li Zefan <lizf@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] tracing: fix event system memory leak
Date: Fri, 28 Oct 2011 14:55:17 +0800 [thread overview]
Message-ID: <4EAA51D5.8080706@cn.fujitsu.com> (raw)
system->ref_count = system->nr_events + ref_count for opening "enable"
and "filter"
so when removing a module, it's wrong to drop ref_count only when nr_events
drops to 0.
Cc: stable <stable@kernel.org>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
kernel/trace/trace_events.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 581876f..281a60a 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1252,8 +1252,8 @@ static void remove_subsystem_dir(const char *name)
if (!--system->nr_events) {
debugfs_remove_recursive(system->entry);
list_del(&system->list);
- __put_system(system);
}
+ __put_system(system);
break;
}
}
--
1.7.3.1
reply other threads:[~2011-10-28 6:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4EAA51D5.8080706@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=linux-kernel@vger.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®