mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <namhyung.kim@lge.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
	mingo@kernel.org, fweisbec@gmail.com, rostedt@goodmis.org,
	namhyung.kim@lge.com, tglx@linutronix.de
Subject: [tip:perf/core] tracing: Check return value of tracing_dentry_percpu()
Date: Sat, 19 May 2012 03:20:53 -0700	[thread overview]
Message-ID: <tip-0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a@git.kernel.org> (raw)
In-Reply-To: <1335143517-2285-1-git-send-email-namhyung.kim@lge.com>

Commit-ID:  0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a
Gitweb:     http://git.kernel.org/tip/0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a
Author:     Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Mon, 23 Apr 2012 10:11:57 +0900
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 16 May 2012 19:50:37 -0400

tracing: Check return value of tracing_dentry_percpu()

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 files changed, 3 insertions(+), 0 deletions(-)

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) {

      parent reply	other threads:[~2012-05-19 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  1:11 [PATCH] " Namhyung Kim
2012-05-15  8:41 ` Namhyung Kim
2012-05-19 10:20 ` tip-bot for Namhyung Kim [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=tip-0a3d7ce7e6caa8c39cb5184bd9047a01a40abc2a@git.kernel.org \
    --to=namhyung.kim@lge.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome