Skip to content

Commit 7fa598f

Browse files
committed
tracing: Do not warn when connecting eprobe to non existing event
When the syscall trace points are not configured in, the kselftests for ftrace will try to attach an event probe (eprobe) to one of the system call trace points. This triggered a WARNING, because the failure only expects to see memory issues. But this is not the only failure. The user may attempt to attach to a non existent event, and the kernel must not warn about it. Link: https://lkml.kernel.org/r/[email protected] Fixes: 7491e2c ("tracing: Add a probe that attaches to trace events") Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 4e84dc4 commit 7fa598f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/trace/trace_eprobe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,8 @@ static int __trace_eprobe_create(int argc, const char *argv[])
904904

905905
if (IS_ERR(ep)) {
906906
ret = PTR_ERR(ep);
907-
/* This must return -ENOMEM, else there is a bug */
908-
WARN_ON_ONCE(ret != -ENOMEM);
907+
/* This must return -ENOMEM or misssing event, else there is a bug */
908+
WARN_ON_ONCE(ret != -ENOMEM && ret != -ENODEV);
909909
ep = NULL;
910910
goto error;
911911
}

0 commit comments

Comments
 (0)