From: Wang Yu <yuwang@linux.alibaba.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, Wang Yu <yuwang@linux.alibaba.com>
Subject: [PATCH] ftrace: fix task's invalid comm of <...> when big pid
Date: Wed, 28 Mar 2018 20:32:27 +0800 [thread overview]
Message-ID: <1522240347-24465-1-git-send-email-yuwang@linux.alibaba.com> (raw)
when pid is bigger than PID_MAX_DEFAULT, the comm of task
is <...>, it is better use pid_max to compare
Signed-off-by: Wang Yu <yuwang@linux.alibaba.com>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 kernel/trace/trace.c
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
old mode 100644
new mode 100755
index 20a2300..0d4bc7a
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1976,7 +1976,7 @@ static void __trace_find_cmdline(int pid, char comm[])
return;
}
- if (pid > PID_MAX_DEFAULT) {
+ if (pid > pid_max) {
strcpy(comm, "<...>");
return;
}
--
1.8.3.1
next reply other threads:[~2018-03-28 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 12:32 Wang Yu [this message]
2018-03-28 15:35 ` Steven Rostedt
2018-03-28 15:44 ` Steven Rostedt
2018-03-29 2:16 ` Wang Yu
2018-03-29 14:26 ` Steven Rostedt
2018-03-30 8:21 ` Wang Yu
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=1522240347-24465-1-git-send-email-yuwang@linux.alibaba.com \
--to=yuwang@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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
Powered by JetHome