[for-linus][PATCH 0/3] tracing: More fixes for v7.3
From: Steven Rostedt
Date: Fri Oct 16 2026 - 09:39:58 EST
tracing fixes for v7.3:
- Fix a crash in print_graph_function_event()
When a tracer does not define static or default flags the
tr->current_trace_flags is set to NULL. If the ring buffer is
not cleared when switching tracers, the previous tracers events
could be read. The function_graph entries will dereference the
tr->current_trace_flags and cause a crash.
Set the tr->current_trace_flags to a empty set of flags to prevent
it from being NULL.
- Separate tracing filter predicate count from allocation
The amount allocated for the predicate program is the number of predicates
defined plus two for adding "true" and "false" at the end. The nr_preds is
incremented by two to accommodate the booleans but is then used as the
limit check for number of predicates. This is incorrect as it is now two
higher than what is expected.
Use a separate variable for the size of the predicate array.
- Fix the filter operator stack check
The operator stack increments the pointer and then writes the content onto
the stack. The check for overflow compared the current pointer to see if
it was greater than the stack size before doing so. This is an off by 2
error as the write will be at the size - 1 and the compare is done before
the increment. Adjust the check accordingly.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes
Head SHA1: c47a7b11bcb3d45e29723afcf6336866476b1d08
Hao Ge (1):
tracing: Fix crash in print_graph_function_event()
Taeyang Lee (2):
tracing: Keep the predicate limit separate from program capacity
tracing: Check operator stack capacity before pushing
----
kernel/trace/trace.c | 20 ++++++++++++++++++--
kernel/trace/trace_events_filter.c | 9 ++++-----
2 files changed, 22 insertions(+), 7 deletions(-)