diff options
author | Tejun Heo <tj@kernel.org> | 2010-02-02 05:38:15 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-02-02 05:38:15 (GMT) |
commit | ab386128f20c44c458a90039ab1bdc265ac474c9 (patch) | |
tree | 2ad188744922b1bb951fd10ff50dc04c83acce22 /kernel/trace/trace.c | |
parent | dbfc196a3cc1a2514ad0737a82f764de23bd65e6 (diff) | |
parent | ab658321f32770b903a4426e2a6fae0392757755 (diff) | |
download | linux-fsl-qoriq-ab386128f20c44c458a90039ab1bdc265ac474c9.tar.xz |
Merge branch 'master' into percpu
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 ab2bbb0..667ba80 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -951,6 +951,11 @@ void trace_find_cmdline(int pid, char comm[]) return; } + if (WARN_ON_ONCE(pid < 0)) { + strcpy(comm, "<XXX>"); + return; + } + if (pid > PID_MAX_DEFAULT) { strcpy(comm, "<...>"); return; |