]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - kernel/trace/trace.c
tracing: Fix checking event hash pointer logic when tp_printk is enabled
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 19 Apr 2021 18:23:12 +0000 (14:23 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 20 Apr 2021 14:56:58 +0000 (10:56 -0400)
commit0e1e71d34901a633825cd5ae78efaf8abd9215c6
tree7ac7cfdfc3ba731c4e25735355bdedaf78a596d5
parent8db403b9631331ef1d5e302cdf353c48849ca9d5
tracing: Fix checking event hash pointer logic when tp_printk is enabled

Pointers in events that are printed are unhashed if the flags allow it,
and the logic to do so is called before processing the event output from
the raw ring buffer. In most cases, this is done when a user reads one of
the trace files.

But if tp_printk is added on the kernel command line, this logic is done
for trace events when they are triggered, and their output goes out via
printk. The unhash logic (and even the validation of the output) did not
support the tp_printk output, and would crash.

Link: https://lore.kernel.org/linux-tegra/9835d9f1-8d3a-3440-c53f-516c2606ad07@nvidia.com/
Fixes: efbbdaa22bb7 ("tracing: Show real address for trace event arguments")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c