Re: [PATCH] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-10-29 13:17:37
On Fri, 29 Oct 2021 12:20:34 +0100 Mark Rutland [off-list ref] wrote:
quoted
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 -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel