]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Fix free of probe entry by calling call_rcu_sched()
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 13 Mar 2013 15:15:19 +0000 (11:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:17:45 +0000 (12:17 -0700)
commitf3654cba3e270f698589fafa047091df3cad3c1c
treec9db8bc8d2aa23a0e508b75531c8073596190d98
parent75e4777264994451fa1148a05e9634a0edc817a6
tracing: Fix free of probe entry by calling call_rcu_sched()

commit 740466bc89ad8bd5afcc8de220f715f62b21e365 upstream.

Because function tracing is very invasive, and can even trace
calls to rcu_read_lock(), RCU access in function tracing is done
with preempt_disable_notrace(). This requires a synchronize_sched()
for updates and not a synchronize_rcu().

Function probes (traceon, traceoff, etc) must be freed after
a synchronize_sched() after its entry has been removed from the
hash. But call_rcu() is used. Fix this by using call_rcu_sched().

Also fix the usage to use hlist_del_rcu() instead of hlist_del().

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ftrace.c