From: Artem Sadovnikov Date: Tue, 17 Jun 2025 15:21:09 +0000 (+0000) Subject: fgraph: Make pid_str size match the comment X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=437889b926b30093048eba31cd1fde00ca8df316;p=thirdparty%2Flinux.git fgraph: Make pid_str size match the comment The comment above buffer mentions sign, 10 bytes width for number and null terminator, but buffer itself isn't large enough to hold that much data. This is a cosmetic change, since PID cannot be negative, other than -1. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lore.kernel.org/20250617152110.2530-1-a.sadovnikov@ispras.ru Signed-off-by: Artem Sadovnikov Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 14d74a7491b8c..66e1a527cf1ac 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c @@ -513,7 +513,7 @@ static void print_graph_proc(struct trace_seq *s, pid_t pid) { char comm[TASK_COMM_LEN]; /* sign + log10(MAX_INT) + '\0' */ - char pid_str[11]; + char pid_str[12]; int spaces = 0; int len; int i;