[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241219201158.193821672@goodmis.org>
Date: Thu, 19 Dec 2024 15:11:58 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH 00/14] tracing: Convert over to guard() and __free() infrastructure
Move tracing over to using guard() and __free() infrastructure
In the past, there's been several bug fixes in the tracing code that
were related to error paths. An error may cause a function to exit
without freeing some memory or releasing a lock.
The new guard() and __free() clean up removes this problem by having
the locks released or memory freed whenever the function exits in
any path.
This also removes a lot of the goto spaghetti code and makes it easier
to read.
This series converts most of the tracing code over to use this infrastructure
where it makes sense.
Steven Rostedt (14):
tracing: Switch trace.c code over to use guard()
tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot
tracing: Have event_enable_write() just return error on error
tracing: Simplify event_enable_func() goto out_free logic
tracing: Simplify event_enable_func() goto_reg logic
tracing: Switch trace_events.c code over to use guard()
tracing: Switch trace_events_hist.c code over to use guard()
tracing: Switch trace_events_trigger.c code over to use guard()
tracing/string: Create and use __free(argv_free) in trace_dynevent.c
tracing: Switch trace_events_filter.c code over to use guard()
tracing: Switch trace_events_synth.c code over to use guard()
tracing: Switch trace_osnoise.c code over to use guard() and __free()
tracing: Switch trace_stack.c code over to use guard()
tracing: Switch trace_stat.c code over to use guard()
----
include/linux/string.h | 3 +
kernel/trace/trace.c | 266 +++++++++++++-----------------------
kernel/trace/trace_dynevent.c | 23 +---
kernel/trace/trace_events.c | 151 +++++++++-----------
kernel/trace/trace_events_filter.c | 23 +---
kernel/trace/trace_events_hist.c | 32 ++---
kernel/trace/trace_events_synth.c | 17 +--
kernel/trace/trace_events_trigger.c | 69 ++++------
kernel/trace/trace_osnoise.c | 40 ++----
kernel/trace/trace_stack.c | 6 +-
kernel/trace/trace_stat.c | 26 ++--
11 files changed, 236 insertions(+), 420 deletions(-)
Powered by blists - more mailing lists