From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
Ingo Molnar <mingo@redhat.com>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH ftrace/core 2/3] trace/kprobes: Avoid self tests if tracing is disabled on boot up
Date: Fri, 06 Jun 2014 10:01:48 +0900 [thread overview]
Message-ID: <539112FC.6070604@hitachi.com> (raw)
In-Reply-To: <20140605223520.32311.56097.stgit@yunodevel>
(2014/06/06 7:35), Yoshihiro YUNOMAE wrote:
> If tracing is disabled on boot up, the kernel should not execute self tests.
> In this patch, the kernel checks whether tracing is disabled or not
> before executing self tests.
Looks good to me, thanks! :)
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
>
> Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: linux-kernel@vger.kernel.org
> ---
> kernel/trace/trace_kprobe.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 903ae28..ef2fba1 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -1377,6 +1377,9 @@ static __init int kprobe_trace_self_tests_init(void)
> struct trace_kprobe *tk;
> struct ftrace_event_file *file;
>
> + if (tracing_is_disabled())
> + return -ENODEV;
> +
> target = kprobe_trace_selftest_target;
>
> pr_info("Testing kprobe tracing: ");
>
>
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2014-06-06 1:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 22:35 [PATCH ftrace/core 0/3] ftrace: Fix three small bugs Yoshihiro YUNOMAE
2014-06-05 22:35 ` [PATCH ftrace/core 1/3] trace/event: Return error if ftrace_trace_arrays is empty list Yoshihiro YUNOMAE
2014-06-06 3:46 ` Steven Rostedt
2014-06-06 6:28 ` [PATCH ftrace/core] tracing: Remove return value in event_trace_self_tests() when top_trace_array() returns NULL Yoshihiro YUNOMAE
2014-06-06 6:31 ` Yoshihiro YUNOMAE
2014-06-06 8:45 ` Steven Rostedt
2014-06-05 22:35 ` [PATCH ftrace/core 2/3] trace/kprobes: Avoid self tests if tracing is disabled on boot up Yoshihiro YUNOMAE
2014-06-06 1:01 ` Masami Hiramatsu [this message]
2014-06-05 22:35 ` [PATCH ftrace/core 3/3] trace: Fix memory leak when new instance creation failed Yoshihiro YUNOMAE
2014-06-06 3:54 ` Steven Rostedt
2014-06-06 4:07 ` 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=539112FC.6070604@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=hidehiro.kawai.ez@hitachi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=yoshihiro.yunomae.ez@hitachi.com \
--cc=yrl.pp-manager.tt@hitachi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.