]> Gentwo Git Trees - linux/.git/commitdiff
tracing: fprobe: Fix to init fprobe_ip_table earlier
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 2 Oct 2025 08:39:04 +0000 (17:39 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 11 Nov 2025 13:32:09 +0000 (22:32 +0900)
Since the fprobe_ip_table is used from module unloading in
the failure path of load_module(), it must be initialized in
the earlier timing than late_initcall(). Unless that, the
fprobe_module_callback() will use an uninitialized spinlock of
fprobe_ip_table.

Initialize fprobe_ip_table in core_initcall which is the same
timing as ftrace.

Link: https://lore.kernel.org/all/175939434403.3665022.13030530757238556332.stgit@mhiramat.tok.corp.google.com/
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202509301440.be4b3631-lkp@intel.com
Fixes: e5a4cc28a052 ("tracing: fprobe: use rhltable for fprobe_ip_table")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Menglong Dong <menglong8.dong@gmail.com>
kernel/trace/fprobe.c

index 95e43814b85bd1c66e3a1262e4ee5d31c4af81db..99d83c08b9e2716a4b17cb84d620e4fd1a96e5e6 100644 (file)
@@ -847,4 +847,4 @@ static int __init fprobe_initcall(void)
        rhltable_init(&fprobe_ip_table, &fprobe_rht_params);
        return 0;
 }
-late_initcall(fprobe_initcall);
+core_initcall(fprobe_initcall);