]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER
authorGabriele Paoloni <gpaoloni@redhat.com>
Fri, 21 Mar 2025 17:08:21 +0000 (18:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:11 +0000 (07:39 +0200)
commit5d16d833cfa1deac05df52d688d85da991b220e0
treefe36110b0a0d1da5c2f5f059ea3ef0487c44f399
parenta32f1d4f1f4c9d978698f3c718621f6198f2e7ac
tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER

[ Upstream commit 0c588ac0ca6c22b774d9ad4a6594681fdfa57d9d ]

When __ftrace_event_enable_disable invokes the class callback to
unregister the event, the return value is not reported up to the
caller, hence leading to event unregister failures being silently
ignored.

This patch assigns the ret variable to the invocation of the
event unregister callback, so that its return value is stored
and reported to the caller, and it raises a warning in case
of error.

Link: https://lore.kernel.org/20250321170821.101403-1-gpaoloni@redhat.com
Signed-off-by: Gabriele Paoloni <gpaoloni@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/trace_events.c