]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Protect ftrace_graph_hash with ftrace_sync
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 5 Feb 2020 14:20:32 +0000 (09:20 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 5 Feb 2020 22:16:42 +0000 (17:16 -0500)
commitc9a2a51f5da7d87fa321683e3ef49cadedca1c62
tree9fcea20433e1f5c27406e9a793e6bd4d090dd03c
parent54c6c282edbc92f36b7113d5e8c962c066f849e9
ftrace: Protect ftrace_graph_hash with ftrace_sync

As function_graph tracer can run when RCU is not "watching", it can not be
protected by synchronize_rcu() it requires running a task on each CPU before
it can be freed. Calling schedule_on_each_cpu(ftrace_sync) needs to be used.

Link: https://lore.kernel.org/r/20200205131110.GT2935@paulmck-ThinkPad-P72
Cc: stable@vger.kernel.org
Fixes: cf5c188e481b2 ("ftrace: Convert graph filter to use hash tables")
Reported-by: "Paul E. McKenney" <paulmck@kernel.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c
kernel/trace/trace.h