]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kprobes: Initialize kprobes at postcore_initcall
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 22 May 2019 08:32:27 +0000 (17:32 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 26 May 2019 03:04:43 +0000 (23:04 -0400)
Initialize kprobes at postcore_initcall level instead of module_init
since kprobes is not a module, and it depends on only subsystems
initialized in core_initcall.
This will allow ftrace kprobe event to add new events when it is
initializing because ftrace kprobe event is initialized at
later initcall level.

Link: http://lkml.kernel.org/r/155851394736.15728.13626739508905120098.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/kprobes.c

index b1ea30a5540e9e1af5f1c86e5590195b6f00bc9d..54aaaad00a47fd495799e235065bbd1e65e69586 100644 (file)
@@ -2289,6 +2289,7 @@ static int __init init_kprobes(void)
                init_test_probes();
        return err;
 }
+postcore_initcall(init_kprobes);
 
 #ifdef CONFIG_DEBUG_FS
 static void report_probe(struct seq_file *pi, struct kprobe *p,
@@ -2614,5 +2615,3 @@ static int __init debugfs_kprobe_init(void)
 
 late_initcall(debugfs_kprobe_init);
 #endif /* CONFIG_DEBUG_FS */
-
-module_init(init_kprobes);