[lvc-project] [PATCH 5.10] tracing/mmiotrace: Add NULL check for mmio_trace_array in logging functions

Sasha Levin sashal at kernel.org
Fri Sep 4 05:52:50 MSK 2026


> Fix this by adding an explicit NULL check for tr at the beginning of
> __trace_mmiotrace_rw() and __trace_mmiotrace_map().

The callers mmio_trace_rw() and mmio_trace_mapping() still dereference
tr->array_buffer.data via per_cpu_ptr() before reaching the functions this
patch guards, so the new checks never run for the NULL case they target.
Mainline is only safe because of the later commit 6936298393d8
("tracing/mmiotrace: Remove reference to unused per CPU data pointer").

-- 
Thanks,
Sasha



More information about the lvc-project mailing list