diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-07-28 21:50:00 +0900 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-07-29 14:27:55 -0400 |
| commit | 12b80cdbc54cf615b4717a4e8180063408091ea2 (patch) | |
| tree | 36915f3a753155d61bb84777d72a4b79ceaeaa47 /tools/perf/scripts/python | |
| parent | c786d2bdf1f3964deee192ad942dee2a741c1e2c (diff) | |
tracing/mmiotrace: Add NULL check for mmio_trace_array in logging functions
mmio_trace_rw() and mmio_trace_mapping() retrieve mmio_trace_array into
tr and pass it to __trace_mmiotrace_rw() and __trace_mmiotrace_map().
If these functions are invoked while mmio_trace_array is NULL (e.g. before
initialization or after disabled), accessing tr->array_buffer.buffer will
result in a NULL pointer dereference crash.
Fix this by adding an explicit NULL check for tr at the beginning of
__trace_mmiotrace_rw() and __trace_mmiotrace_map().
Link: https://patch.msgid.link/178524300062.56416.8362487250709962380.stgit@devnote2
Fixes: f984b51e0779 ("ftrace: add mmiotrace plugin")
Assisted-by: Antigravity:gemini-3.6-flash
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
