]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Get a reference counter for the trace_array on filter files
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 11 Oct 2019 21:56:57 +0000 (17:56 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 13 Oct 2019 00:40:21 +0000 (20:40 -0400)
commit4801440a640e74ddbf17e13e1ba4952e94ca4333
tree7e23890397b42a49853612a91c2edb9f48f489f2
parentfdef55aedc75210b48a9e7821ac2acd378033fef
ftrace: Get a reference counter for the trace_array on filter files

The ftrace set_ftrace_filter and set_ftrace_notrace files are specific for
an instance now. They need to take a reference to the instance otherwise
there could be a race between accessing the files and deleting the instance.

It wasn't until the :mod: caching where these file operations started
referencing the trace_array directly.

Cc: stable@vger.kernel.org
Fixes: 9a13ee9a0a1b6 ("ftrace: Add :mod: caching infrastructure to trace_array")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c