linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vaibhav Nagarnaik <vnagarnaik@google.com>,
	David Sharp <dhsharp@google.com>,
	Wang YanQing <udknight@gmail.com>
Subject: [for-next][PATCH 04/12] tracing: Fix file mode of free_buffer
Date: Wed, 19 Jun 2013 23:35:20 -0400	[thread overview]
Message-ID: <20130620033639.086221025@goodmis.org> (raw)
In-Reply-To: 20130620033516.003166252@goodmis.org

[-- Attachment #1: 0004-tracing-Fix-file-mode-of-free_buffer.patch --]
[-- Type: text/plain, Size: 1356 bytes --]

From: Wang YanQing <udknight@gmail.com>

Commit 4f271a2a60c748599b30bb4dafff30d770439b96
(tracing: Add a proc file to stop tracing and free buffer)
implement a method to free up ring buffer in kernel memory
in the release code path of free_buffer's fd.

Then we don't need read/write support for free_buffer,
indeed we just have a dummy write fop, and don't implement read fop.

So the 0200 is more reasonable file mode for free_buffer than
the current file mode 0644.

Link: http://lkml.kernel.org/r/20130526085201.GA3183@udknight

Acked-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Acked-by: David Sharp <dhsharp@google.com>
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1a41023..5f4a09c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5935,7 +5935,7 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
 	trace_create_file("buffer_total_size_kb", 0444, d_tracer,
 			  tr, &tracing_total_entries_fops);
 
-	trace_create_file("free_buffer", 0644, d_tracer,
+	trace_create_file("free_buffer", 0200, d_tracer,
 			  tr, &tracing_free_buffer_fops);
 
 	trace_create_file("trace_marker", 0220, d_tracer,
-- 
1.7.10.4



  parent reply	other threads:[~2013-06-20  3:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20  3:35 [for-next][PATCH 00/12] tracing: Updates and minor fixes for 3.11 Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 01/12] tracing: Add function probe to trigger a ftrace dump to console Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 02/12] tracing: Add function probe to trigger a ftrace dump of current CPU trace Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 03/12] tracing/trivial: Consolidate error return condition Steven Rostedt
2013-06-20  3:35 ` Steven Rostedt [this message]
2013-06-20  3:35 ` [for-next][PATCH 05/12] ftrace: Use schedule_on_each_cpu() as a heavy synchronize_sched() Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 06/12] ftrace: Remove ftrace_regex_lseek() Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 07/12] tracing: Do not call kmem_cache_free() on allocation failure Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 08/12] tracing: Add binary & filter for events Steven Rostedt
2013-06-20  8:09   ` Arend van Spriel
2013-06-20 12:14     ` Steven Rostedt
2013-06-20 18:28       ` Arend van Spriel
2013-06-20 18:34         ` Steven Rostedt
2013-06-20 18:38           ` Steven Rostedt
2013-06-20 19:15             ` Arend van Spriel
2013-06-20  3:35 ` [for-next][PATCH 09/12] tracing: Update documentation on tracepoint glob matching Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 10/12] tracing: Disable tracing on warning Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 11/12] tracing/kprobes: Remove unnecessary checking of trace_probe_is_enabled Steven Rostedt
2013-06-20  3:35 ` [for-next][PATCH 12/12] ftrace: Fix stddev calculation in function profiler 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=20130620033639.086221025@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhsharp@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=udknight@gmail.com \
    --cc=vnagarnaik@google.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;
as well as URLs for NNTP newsgroup(s).