lkml.org 
[lkml]   [2018]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ftrace: fix task's invalid comm of <...> when big pid
Date
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
\
 
 \ /
  Last update: 2018-03-28 14:33    [W:0.284 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site