diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5314c90bbc83..032c57ca6502 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1028,6 +1028,11 @@ void trace_find_cmdline(int pid, char comm[]) | |||
1028 | return; | 1028 | return; |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | if (WARN_ON_ONCE(pid < 0)) { | ||
1032 | strcpy(comm, "<XXX>"); | ||
1033 | return; | ||
1034 | } | ||
1035 | |||
1031 | if (pid > PID_MAX_DEFAULT) { | 1036 | if (pid > PID_MAX_DEFAULT) { |
1032 | strcpy(comm, "<...>"); | 1037 | strcpy(comm, "<...>"); |
1033 | return; | 1038 | return; |