[LTP] [PATCH] fanotify25: Trace oom_kill_process() instead of load_module()

Martin Doucha mdoucha@suse.cz
Tue Mar 3 11:55:09 CET 2026


The load_module() function is available only if the kernel was built
with CONFIG_MODULES enabled. Trace a function that's unconditionally
available instead.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
Reported-by: Amir Goldstein <amir73il@gmail.com>
---
 testcases/kernel/syscalls/fanotify/fanotify25.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify25.c b/testcases/kernel/syscalls/fanotify/fanotify25.c
index c982f3225..db52e6a87 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify25.c
+++ b/testcases/kernel/syscalls/fanotify/fanotify25.c
@@ -24,10 +24,10 @@ static const struct traceconfig {
 	const char *filename;
 	const char *wdata;
 } trace_cmds[] = {
-	{EVENTS_SYSFILE, "p:ltp_load_module_0 load_module"},
-	{MNTPOINT "/events/kprobes/ltp_load_module_0/enable", "1"},
-	{MNTPOINT "/events/kprobes/ltp_load_module_0/enable", "0"},
-	{EVENTS_SYSFILE, "-:ltp_load_module_0"},
+	{EVENTS_SYSFILE, "p:ltp_oom_kill_process_0 oom_kill_process"},
+	{MNTPOINT "/events/kprobes/ltp_oom_kill_process_0/enable", "1"},
+	{MNTPOINT "/events/kprobes/ltp_oom_kill_process_0/enable", "0"},
+	{EVENTS_SYSFILE, "-:ltp_oom_kill_process_0"},
 	{}
 };
 
-- 
2.52.0



More information about the ltp mailing list