public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [for-next-3.11][PATCH 0/2] tracing: A couple more fixes
@ 2013-07-20  3:20 Steven Rostedt
  2013-07-20  3:20 ` [for-next-3.11][PATCH 1/2] tracing: Kill trace_array->waiter Steven Rostedt
  2013-07-20  3:20 ` [for-next-3.11][PATCH 2/2] tracing: Kill the unbalanced tr->ref++ in tracing_buffers_open() Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-07-20  3:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton

Oleg sent me a couple more fixes. Pushing them into my for-next branch.
Monday I'll push to Linus.

-- Steve


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: e70e78e3c83b536730e31231dd9b979768d8df3c
1bb539ca36e21c2f4fce0865e11df384bc7b7656


Oleg Nesterov (2):
      tracing: Kill trace_array->waiter
      tracing: Kill the unbalanced tr->ref++ in tracing_buffers_open()

----
 kernel/trace/trace.c |    2 --
 kernel/trace/trace.h |    1 -
 2 files changed, 3 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [for-next-3.11][PATCH 1/2] tracing: Kill trace_array->waiter
  2013-07-20  3:20 [for-next-3.11][PATCH 0/2] tracing: A couple more fixes Steven Rostedt
@ 2013-07-20  3:20 ` Steven Rostedt
  2013-07-20  3:20 ` [for-next-3.11][PATCH 2/2] tracing: Kill the unbalanced tr->ref++ in tracing_buffers_open() Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-07-20  3:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Oleg Nesterov

[-- Attachment #1: 0001-tracing-Kill-trace_array-waiter.patch --]
[-- Type: text/plain, Size: 713 bytes --]

From: Oleg Nesterov <oleg@redhat.com>

Trivial. trace_array->waiter has no users since 6eaaa5d5
"tracing/core: use appropriate waiting on trace_pipe".

Link: http://lkml.kernel.org/r/20130719142036.GA1594@redhat.com

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.h |    1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 57b7bb0..e7d643b 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -214,7 +214,6 @@ struct trace_array {
 	struct dentry		*event_dir;
 	struct list_head	systems;
 	struct list_head	events;
-	struct task_struct	*waiter;
 	int			ref;
 };
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [for-next-3.11][PATCH 2/2] tracing: Kill the unbalanced tr->ref++ in tracing_buffers_open()
  2013-07-20  3:20 [for-next-3.11][PATCH 0/2] tracing: A couple more fixes Steven Rostedt
  2013-07-20  3:20 ` [for-next-3.11][PATCH 1/2] tracing: Kill trace_array->waiter Steven Rostedt
@ 2013-07-20  3:20 ` Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-07-20  3:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Ingo Molnar,
	Masami Hiramatsu, stable, Oleg Nesterov

[-- Attachment #1: 0002-tracing-Kill-the-unbalanced-tr-ref-in-tracing_buffer.patch --]
[-- Type: text/plain, Size: 1194 bytes --]

From: Oleg Nesterov <oleg@redhat.com>

tracing_buffers_open() does trace_array_get() and then it wrongly
inrcements tr->ref again under trace_types_lock. This means that
every caller leaks trace_array:

	# cd /sys/kernel/debug/tracing/
	# mkdir instances/X
	# true < instances/X/per_cpu/cpu0/trace_pipe_raw
	# rmdir instances/X
	rmdir: failed to remove `instances/X': Device or resource busy

Link: http://lkml.kernel.org/r/20130719153644.GA18899@redhat.com

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7d9ceab..3f24777 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4959,8 +4959,6 @@ static int tracing_buffers_open(struct inode *inode, struct file *filp)
 
 	mutex_lock(&trace_types_lock);
 
-	tr->ref++;
-
 	info->iter.tr		= tr;
 	info->iter.cpu_file	= tc->cpu;
 	info->iter.trace	= tr->current_trace;
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-20  3:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-20  3:20 [for-next-3.11][PATCH 0/2] tracing: A couple more fixes Steven Rostedt
2013-07-20  3:20 ` [for-next-3.11][PATCH 1/2] tracing: Kill trace_array->waiter Steven Rostedt
2013-07-20  3:20 ` [for-next-3.11][PATCH 2/2] tracing: Kill the unbalanced tr->ref++ in tracing_buffers_open() Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox