[PATCH] maple_tree: fix tracepoint string pointers

Andrew Morton akpm at linux-foundation.org
Thu Oct 30 19:32:06 PDT 2025


On Thu, 30 Oct 2025 16:55:05 +0100 Martin Kaiser <martin at kaiser.cx> wrote:

> maple_tree tracepoints contain pointers to function names. Such a pointer
> is saved when a tracepoint logs an event. There's no guarantee that it's
> still valid when the event is parsed later and the pointer is dereferenced.

Oh.

> The kernel warns about these unsafe pointers.
> 
> 	event 'ma_read' has unsafe pointer field 'fn'
> 	WARNING: kernel/trace/trace.c:3779 at ignore_event+0x1da/0x1e4
> 
> Mark the function names as tracepoint_string() to fix the events.
> 
> ...
>  
> -	trace_ma_op(__func__, mas);
> +	trace_ma_op(TP_FCT, mas);
>

What could cause the storage for __func__ to disappear as you suggest?




More information about the maple-tree mailing list