]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 14 Nov 2016 21:31:49 +0000 (16:31 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 14 Nov 2016 21:31:49 +0000 (16:31 -0500)
commit8a00beb6f6b66c1f6abe6d0251ec6a72057c5f07
tree04608cf612ed5f5173992abc25c554ed5169e9f7
parent757f8aa85a78a3e7d265c60242d72975bdd9634d
ftrace: Add more checks for FTRACE_FL_DISABLED in processing ip records

When a module is first loaded and its function ip records are added to the
ftrace list of functions to modify, they are set to DISABLED, as their text
is still in a read only state. When the module is fully loaded, and can be
updated, the flag is cleared, and if their's any functions that should be
tracing them, it is updated at that moment.

But there's several locations that do record accounting and should ignore
records that are marked as disabled, or they can cause issues.

Alexei already fixed one location, but others need to be addressed.

Cc: stable@vger.kernel.org
Fixes: 7990eb104e44 "ftrace: Add infrastructure for delayed enabling of module functions"
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c