On Thu, Oct 03, 2024 at 10:49:25AM -0400, Steven Rostedt wrote: > From: Steven Rostedt <[email protected]> > > When the tp_printk kernel command line is used, the trace events go > directly to printk(). It is still checked via the trace_check_vprintf() > function to make sure the pointers of the trace event are legit. > > The addition of reading buffers from previous boots required adding a > delta between the addresses of the previous boot and the current boot so > that the pointers in the old buffer can still be used. But this required > adding a trace_array pointer to acquire the delta offsets. > > The tp_printk code does not provide a trace_array (tr) pointer, so when > the offsets were examined, a NULL pointer dereference happened and the > kernel crashed. > > If the trace_array does not exist, just default the delta offsets to zero, > as that also means the trace event is not being read from a previous boot. > > Link: https://lore.kernel.org/all/[email protected]/ >
Thanks Steve! Tested-by: Alison Schofield <[email protected]> > Reported-by: Alison Schofield <[email protected]> > Fixes: 07714b4bb3f98 ("tracing: Handle old buffer mappings for event strings > and functions") > Signed-off-by: Steven Rostedt (Google) <[email protected]> > --- > kernel/trace/trace.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > snip
