From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung.kim@lge.com>
Subject: [PATCH 06/15] tracing: Check return value of tracing_dentry_percpu()
Date: Fri, 18 May 2012 09:09:04 -0400 [thread overview]
Message-ID: <20120518131048.948597069@goodmis.org> (raw)
In-Reply-To: 20120518130858.392919640@goodmis.org
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
From: Namhyung Kim <namhyung.kim@lge.com>
If tracing_dentry_percpu() failed, tracing_init_debugfs_percpu()
will try to create each cpu directories on debugfs' root directory
as d_percpu is NULL.
Link: http://lkml.kernel.org/r/1335143517-2285-1-git-send-email-namhyung.kim@lge.com
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index dfbd86c..0ed4df0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4474,6 +4474,9 @@ static void tracing_init_debugfs_percpu(long cpu)
struct dentry *d_cpu;
char cpu_dir[30]; /* 30 characters should be more than enough */
+ if (!d_percpu)
+ return;
+
snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) {
--
1.7.10
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-18 13:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 13:08 [PATCH 00/15] [GIT PULL] tracing: Updates for 3.5 Steven Rostedt
2012-05-18 13:08 ` [PATCH 01/15] tracing: Clean up tracing_mark_write() Steven Rostedt
2012-05-18 13:09 ` [PATCH 02/15] ring-buffer: Make removal of ring buffer pages atomic Steven Rostedt
2012-05-18 13:09 ` [PATCH 03/15] ring-buffer: Make addition of pages in ring buffer atomic Steven Rostedt
2012-05-18 13:09 ` [PATCH 04/15] ring-buffer: Add integrity check at end of iter read Steven Rostedt
2012-05-18 13:09 ` [PATCH 05/15] ring-buffer: Reset head page before running self test Steven Rostedt
2012-05-18 13:09 ` Steven Rostedt [this message]
2012-05-18 13:09 ` [PATCH 07/15] tracing: change CPU ring buffer state from tracing_cpumask Steven Rostedt
2012-05-18 13:09 ` [PATCH 08/15] ftrace: Sort all function addresses, not just per page Steven Rostedt
2012-05-18 13:09 ` [PATCH 09/15] ftrace: Remove extra helper functions Steven Rostedt
2012-05-18 13:09 ` [PATCH 10/15] ftrace: Speed up search by skipping pages by address Steven Rostedt
2012-05-18 13:09 ` [PATCH 11/15] ftrace: Consolidate ftrace_location() and ftrace_text_reserved() Steven Rostedt
2012-05-18 13:09 ` [PATCH 12/15] ftrace: Return record ip addr for ftrace_location() Steven Rostedt
2012-05-18 14:19 ` Masami Hiramatsu
2012-05-18 13:09 ` [PATCH 13/15] ftrace: Make ftrace_modify_all_code() global for archs to use Steven Rostedt
2012-05-18 13:09 ` [PATCH 14/15] ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code() Steven Rostedt
2012-05-18 13:09 ` [PATCH 15/15] ftrace: Remove selecting FRAME_POINTER with FUNCTION_TRACER Steven Rostedt
2012-05-19 1:43 ` [PATCH 00/15] [GIT PULL] tracing: Updates for 3.5 Steven Rostedt
2012-05-19 10:12 ` Ingo Molnar
2012-05-19 12:25 ` Steven Rostedt
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=20120518131048.948597069@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=namhyung.kim@lge.com \
/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