]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tracing: Get trace_array reference for available_tracers files
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 11 Oct 2019 22:19:17 +0000 (18:19 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:38 +0000 (19:04 +0100)
commit4583cc8a8c2307dcf1a7d037491d90d03505c37b
tree5b2bbd59a0a8b06e52fa35f5d12f582c711aab5c
parent43094679a736ef2e10326c399c9ae11016bfd1ff
tracing: Get trace_array reference for available_tracers files

BugLink: https://bugs.launchpad.net/bugs/1850541
commit 194c2c74f5532e62c218adeb8e2b683119503907 upstream.

As instances may have different tracers available, we need to look at the
trace_array descriptor that shows the list of the available tracers for the
instance. But there's a race between opening the file and an admin
deleting the instance. The trace_array_get() needs to be called before
accessing the trace_array.

Cc: stable@vger.kernel.org
Fixes: 607e2ea167e56 ("tracing: Set up infrastructure to allow tracers for instances")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
kernel/trace/trace.c