3.10-stable review patch. If anyone has any objections, please let me know.
------------------ From: Oleg Nesterov <o...@redhat.com> commit e70e78e3c83b536730e31231dd9b979768d8df3c upstream. 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.ga18...@redhat.com Signed-off-by: Oleg Nesterov <o...@redhat.com> Cc: Ingo Molnar <mi...@redhat.com> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: Masami Hiramatsu <masami.hiramatsu...@hitachi.com> Signed-off-by: Steven Rostedt <rost...@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- kernel/trace/trace.c | 2 -- 1 file changed, 2 deletions(-) --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4907,8 +4907,6 @@ static int tracing_buffers_open(struct i mutex_lock(&trace_types_lock); - tr->ref++; - info->iter.tr = tr; info->iter.cpu_file = tc->cpu; info->iter.trace = tr->current_trace; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/