From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Artem Sadovnikov <a.sadovnikov@ispras.ru>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-trace-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] fgraph: Make pid_str size match the comment
Date: Fri, 20 Jun 2025 09:30:30 +0900 [thread overview]
Message-ID: <20250620093030.3d2d11edf2c4c54c263eddd5@kernel.org> (raw)
In-Reply-To: <20250617152110.2530-1-a.sadovnikov@ispras.ru>
On Tue, 17 Jun 2025 15:21:09 +0000
Artem Sadovnikov <a.sadovnikov@ispras.ru> wrote:
> 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.
Looks good to me.
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks,
>
> Signed-off-by: Artem Sadovnikov <a.sadovnikov@ispras.ru>
> ---
> kernel/trace/trace_functions_graph.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index a8c1f56340680..d789d308ab1de 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -344,7 +344,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;
> --
> 2.43.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2025-06-20 0:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 15:21 Artem Sadovnikov
2025-06-20 0:30 ` Masami Hiramatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250620093030.3d2d11edf2c4c54c263eddd5@kernel.org \
--to=mhiramat@kernel.org \
--cc=a.sadovnikov@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®