]> git.ipfire.org Git - people/ms/linux.git/commit
ftrace: Fix synchronization location disabling and freeing ftrace_ops
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 13 Jan 2014 17:56:21 +0000 (12:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:50:25 +0000 (13:50 -0800)
commitb5434bb39330d699d1491c71d83728d4d8ba87ae
tree7d3d9da65b50b52bfd1ff4c57be67e84a9d02647
parent2cd6ab0be09b3735ba2ffbd94e0d6cee04d4f7ca
ftrace: Fix synchronization location disabling and freeing ftrace_ops

commit a4c35ed241129dd142be4cadb1e5a474a56d5464 upstream.

The synchronization needed after ftrace_ops are unregistered must happen
after the callback is disabled from becing called by functions.

The current location happens after the function is being removed from the
internal lists, but not after the function callbacks were disabled, leaving
the functions susceptible of being called after their callbacks are freed.

This affects perf and any externel users of function tracing (LTTng and
SystemTap).

Fixes: cdbe61bfe704 "ftrace: Allow dynamically allocated function tracers"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ftrace.c