[PATCH] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
Mark Rutland
mark.rutland at arm.com
Fri Oct 29 06:33:49 PDT 2021
On Fri, Oct 29, 2021 at 09:15:45AM -0400, Steven Rostedt wrote:
> On Fri, 29 Oct 2021 12:20:34 +0100
> Mark Rutland <mark.rutland at arm.com> wrote:
>
> > > That seems to be the following in __trace_eprobe_create():
> > >
> > > | mutex_lock(&event_mutex);
> > > | event_call = find_and_get_event(sys_name, sys_event);
> > > | ep = alloc_event_probe(group, event, event_call, argc - 2);
> > > | mutex_unlock(&event_mutex);
> > > |
> > > | if (IS_ERR(ep)) {
> > > | ret = PTR_ERR(ep);
> > > | /* This must return -ENOMEM, else there is a bug */
> > > | WARN_ON_ONCE(ret != -ENOMEM);
> > > | ep = NULL;
> > > | goto error;
> > > | }
> > >
> > > ... but I haven't yet dug into exactly why that's returning an
> > > unexpected error code.
> >
> > It turns out this is a latent bug when the user requests a bogus event,
> > find_and_get_event() fails and returns NULL, causing alloc_event_probe()
> > to return -ENODEV.
> >
> > The right thing to do there is to check the result of
> > find_and_get_event(); I have a local patch for that.
>
> It's been fixed in mainline:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7fa598f9706d40bd16f2ab286bdf5808e1393d35
Ah, even better; thanks for the pointer!
Mark.
More information about the linux-arm-kernel
mailing list