lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5@git.kernel.org>
Date:   Tue, 20 Jun 2017 02:05:53 -0700
From:   tip-bot for Namhyung Kim <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, linux-kernel@...r.kernel.org, hpa@...or.com,
        fweisbec@...il.com, acme@...hat.com, jolsa@...nel.org,
        mhiramat@...nel.org, mingo@...nel.org, rostedt@...dmis.org,
        namhyung@...nel.org, peterz@...radead.org
Subject: [tip:perf/core] perf ftrace: Move setup_pager before opening
 trace_pipe

Commit-ID:  29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5
Gitweb:     http://git.kernel.org/tip/29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5
Author:     Namhyung Kim <namhyung@...nel.org>
AuthorDate: Sun, 18 Jun 2017 23:23:00 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 19 Jun 2017 22:05:52 -0300

perf ftrace: Move setup_pager before opening trace_pipe

The 'perf ftrace' command fails to reset tracer after finishing
recording like below:

  $ sudo perf ftrace -v hello
  write 'nop' to tracing/current_tracer failed: Device or resource busy
  ...

This is because the trace_pipe file is open in pager process.  Move the
pager setup to before opening the file.

Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: kernel-team@....com
Fixes: 583359646fde ("perf ftrace: Use pager for displaying result")
Link: http://lkml.kernel.org/r/20170618142302.25390-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-ftrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 966a94f..982b98e 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -231,6 +231,8 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
 		goto out_reset;
 	}
 
+	setup_pager();
+
 	trace_file = get_tracing_file("trace_pipe");
 	if (!trace_file) {
 		pr_err("failed to open trace_pipe\n");
@@ -254,8 +256,6 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
 		goto out_close_fd;
 	}
 
-	setup_pager();
-
 	perf_evlist__start_workload(ftrace->evlist);
 
 	while (!done) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ