Skip to content

Commit fc18cc8

Browse files
committed
Merge tag 'trace-v5.15-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "Do not WARN when attaching event probe to non-existent event If the user tries to attach an event probe (eprobe) to an event that does not exist, it will trigger a warning. There's an error check that only expects memory issues otherwise it is considered a bug. But changes in the code to move around the locking made it that it can error out if the user attempts to attach to an event that does not exist, returning an -ENODEV. As this path can be caused by user space putting in a bad value, do not trigger a WARN" * tag 'trace-v5.15-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not warn when connecting eprobe to non existing event
2 parents 9c54567 + 7fa598f commit fc18cc8

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)