[PATCH 1/2] kprobes: Initialize kprobes at subsys_initcall

Masami Hiramatsu
2019-05-21T07:56:34Z

Initialize kprobes at subsys_initcall stage instead of module_init
since kprobes is not a module. This will allow ftrace kprobe
event to add new events when it is initializing because ftrace
kprobe event is initialized at fs_initcall.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
kernel/kprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index c83e54727131..b7b6c90bb59c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2617,4 +2617,4 @@ static int __init debugfs_kprobe_init(void)
late_initcall(debugfs_kprobe_init);
#endif /* CONFIG_DEBUG_FS */

-module_init(init_kprobes);
+subsys_initcall(init_kprobes);