]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Check both notrace and filter for old hash
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 13 Jan 2015 19:03:38 +0000 (14:03 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 15 Jan 2015 14:37:33 +0000 (09:37 -0500)
commitf4b64b3c31058ac30f181bf2eba9da6339c7ca0f
tree4372346d3485319f7b98acccbbaba6d41887fda0
parent56b95d0c5531fc6147801f9dc2c658ad33b504c6
ftrace: Check both notrace and filter for old hash

Using just the filter for checking for trampolines or regs is not enough
when updating the code against the records that represent all functions.
Both the filter hash and the notrace hash need to be checked.

To trigger this bug (using trace-cmd and perf):

 # perf probe -a do_fork
 # trace-cmd start -B foo -e probe
 # trace-cmd record -p function_graph -n do_fork sleep 1

The trace-cmd record at the end clears the filter before it disables
function_graph tracing and then that causes the accounting of the
ftrace function records to become incorrect and causes ftrace to bug.

Link: http://lkml.kernel.org/r/20150114154329.358378039@goodmis.org
Cc: stable@vger.kernel.org
[ still need to switch old_hash_ops to old_ops_hash ]
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c