summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-03-13 11:15:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-28 12:12:06 -0700
commit52cecaa20589203f08a965af4604acec8a946825 (patch)
tree0e48ffe412192e158f736d6a7ae3b1d896901b52 /kernel
parent1e3b58b64c6574c9c8e299c68c8c4716f8dd3c21 (diff)
downloadlinux-3.10-52cecaa20589203f08a965af4604acec8a946825.tar.gz
linux-3.10-52cecaa20589203f08a965af4604acec8a946825.tar.bz2
linux-3.10-52cecaa20589203f08a965af4604acec8a946825.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4a86e640408..62f3751816c 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3034,8 +3034,8 @@ __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops,
continue;
}
- hlist_del(&entry->node);
- call_rcu(&entry->rcu, ftrace_free_entry_rcu);
+ hlist_del_rcu(&entry->node);
+ call_rcu_sched(&entry->rcu, ftrace_free_entry_rcu);
}
}
__disable_ftrace_function_probe();