]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Use manual free after synchronize_sched() not call_rcu_sched()
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 13 Mar 2013 16:42:58 +0000 (12:42 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 15 Mar 2013 04:36:03 +0000 (00:36 -0400)
commit68e5ead73839320a81135c6c66d7248abf4f5d04
tree1037f3bb76e18594a9267d27afc27bbdf02b8e65
parent44308a0b5a2111333347389c33030a1d8934febe
ftrace: Use manual free after synchronize_sched() not call_rcu_sched()

The entries to the probe hash must be freed after a synchronize_sched()
after the entry has been removed from the hash.

As the entries are registered with ops that may have their own callbacks,
and these callbacks may sleep, we can not use call_rcu_sched() because
the rcu callbacks registered with that are called from a softirq context.

Instead of using call_rcu_sched(), manually save the entries on a free_list
and at the end of the loop that removes the entries, do a synchronize_sched()
and then go through the free_list, freeing the entries.

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