From: "Steven Rostedt (VMware)" There's places that take tracepoints_mutex while holding get_online_cpus(), and since tracepoints call jump_label code, which also takes get_online_cpus(), make sure that the tracepoints_mutex is always taken under get_online_cpus(). Signed-off-by: Steven Rostedt (VMware) --- kernel/tracepoint.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 685c50ae6300..e41eab51b435 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -276,12 +277,14 @@ int tracepoint_probe_register_prio(struct tracepoint *tp, void *probe, struct tracepoint_func tp_func; int ret; + get_online_cpus(); mutex_lock(&tracepoints_mutex); tp_func.func = probe; tp_func.data = data; tp_func.prio = prio; ret = tracepoint_add_func(tp, &tp_func, prio); mutex_unlock(&tracepoints_mutex); + put_online_cpus(); return ret; } EXPORT_SYMBOL_GPL(tracepoint_probe_register_prio); @@ -318,11 +321,13 @@ int tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data) struct tracepoint_func tp_func; int ret; + get_online_cpus(); mutex_lock(&tracepoints_mutex); tp_func.func = probe; tp_func.data = data; ret = tracepoint_remove_func(tp, &tp_func); mutex_unlock(&tracepoints_mutex); + put_online_cpus(); return ret; } EXPORT_SYMBOL_GPL(tracepoint_probe_unregister); -- 2.10.2