Skip to content

Commit b5f8b32

Browse files
mhiramatrostedt
authored andcommitted
kprobes: Initialize kprobes at postcore_initcall
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>
1 parent 539b75b commit b5f8b32

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/kprobes.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,6 +2289,7 @@ static int __init init_kprobes(void)
22892289
init_test_probes();
22902290
return err;
22912291
}
2292+
postcore_initcall(init_kprobes);
22922293

22932294
#ifdef CONFIG_DEBUG_FS
22942295
static void report_probe(struct seq_file *pi, struct kprobe *p,
@@ -2614,5 +2615,3 @@ static int __init debugfs_kprobe_init(void)
26142615

26152616
late_initcall(debugfs_kprobe_init);
26162617
#endif /* CONFIG_DEBUG_FS */
2617-
2618-
module_init(init_kprobes);

0 commit comments

Comments
 (0)