Files
linux-stable-mirror/kernel
Pengpeng Hou 3cb6cb9c5a tracing: Rebuild full_name on each hist_field_name() call
[ Upstream commit 5ec1d1e97d ]

hist_field_name() uses a static MAX_FILTER_STR_VAL buffer for fully
qualified variable-reference names, but it currently appends into that
buffer with strcat() without rebuilding it first. As a result, repeated
calls append a new "system.event.field" name onto the previous one,
which can eventually run past the end of full_name.

Build the name with snprintf() on each call and return NULL if the fully
qualified name does not fit in MAX_FILTER_STR_VAL.

Link: https://patch.msgid.link/20260401112224.85582-1-pengpeng@iscas.ac.cn
Fixes: 067fe038e7 ("tracing: Add variable reference handling to hist triggers")
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Tested-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-05-23 13:04:40 +02:00
..
2026-05-23 13:04:25 +02:00
2026-05-23 13:04:35 +02:00
2025-11-24 10:35:59 +01:00
2024-10-09 12:47:19 -07:00
2024-09-03 21:15:26 -07:00
2026-05-23 13:04:35 +02:00
2026-05-23 13:04:35 +02:00
2024-09-27 08:18:43 -07:00
2026-05-23 13:04:35 +02:00
2025-12-18 13:54:50 +01:00
2026-05-23 13:04:35 +02:00