tracing: Change tracing_pipe_fops() to rely on tracing_get_cpu()
authorOleg Nesterov <oleg@redhat.com>
Tue, 23 Jul 2013 15:25:57 +0000 (17:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2013 16:47:32 +0000 (09:47 -0700)
commit23b625fa111e7358ce84672c4444c068b2b1e204
tree592c16d7d53e3034a324f8132f0930af74c1c89c
parente2d4dbe02175e54616fe52c4e9c367199f8ecdaa
tracing: Change tracing_pipe_fops() to rely on tracing_get_cpu()

commit 15544209cb0b5312e5220a9337a1fe61d1a1f2d9 upstream.

tracing_open_pipe() is racy, the memory inode->i_private points to
can be already freed.

Change debugfs_create_file("trace_pipe", data) callers to to pass
"data = tr", tracing_open_pipe() can use tracing_get_cpu().

Link: http://lkml.kernel.org/r/20130723152557.GA23717@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c