X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=kernel%2Ftracepoint.c;h=29f26540e9c9550fd1c099512e7b20beb21ce234;hb=91e14b294f3fe4d8b28516b21ceef187ea9b1bdf;hp=63630aef3bd368ca34aaeb783b731767da499fbf;hpb=dae04c1c00f74dd21cce9d85ce90ff50b26d4741;p=firefly-linux-kernel-4.4.55.git diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 63630aef3bd3..29f26540e9c9 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -631,25 +631,17 @@ void tracepoint_iter_reset(struct tracepoint_iter *iter) EXPORT_SYMBOL_GPL(tracepoint_iter_reset); #ifdef CONFIG_MODULES -bool trace_module_has_bad_taint(struct module *mod) -{ - return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP)); -} - static int tracepoint_module_coming(struct module *mod) { struct tp_module *tp_mod, *iter; int ret = 0; - if (!mod->num_tracepoints) - return 0; - /* * We skip modules that taint the kernel, especially those with different * module headers (for forced load), to make sure we don't cause a crash. * Staging and out-of-tree GPL modules are fine. */ - if (trace_module_has_bad_taint(mod)) + if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP))) return 0; mutex_lock(&tracepoints_mutex); tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL); @@ -687,9 +679,6 @@ static int tracepoint_module_going(struct module *mod) { struct tp_module *pos; - if (!mod->num_tracepoints) - return 0; - mutex_lock(&tracepoints_mutex); tracepoint_update_probe_range(mod->tracepoints_ptrs, mod->tracepoints_ptrs + mod->num_tracepoints);