summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-03-03 18:00:22 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-10-05 17:57:30 -0400
commit3e234289f86b12985ef8909cd34525fcb66c4efb (patch)
treef72cbdc94ec14dd0504314fb4d316bf03b13367f /kernel/module.c
parent6cafbe159416822f6d3dfd711bf4c39050c650ba (diff)
downloadlinux-3e234289f86b12985ef8909cd34525fcb66c4efb.tar.bz2
ftrace: Allow module init functions to be traced
Allow for module init sections to be traced as well as core kernel init sections. Now that filtering modules functions can be stored, for when they are loaded, it makes sense to be able to trace them. Cc: Jessica Yu <jeyu@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index de66ec825992..58bca427ac3f 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3473,6 +3473,8 @@ static noinline int do_init_module(struct module *mod)
if (!mod->async_probe_requested && (current->flags & PF_USED_ASYNC))
async_synchronize_full();
+ ftrace_free_mem(mod->init_layout.base, mod->init_layout.base +
+ mod->init_layout.size);
mutex_lock(&module_mutex);
/* Drop initial reference. */
module_put(mod);