diff options
-rw-r--r-- | kernel/trace/trace.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ca673c475687..06c69a260328 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -787,12 +787,11 @@ void trace_find_cmdline(int pid, char comm[]) | |||
787 | 787 | ||
788 | __raw_spin_lock(&trace_cmdline_lock); | 788 | __raw_spin_lock(&trace_cmdline_lock); |
789 | map = map_pid_to_cmdline[pid]; | 789 | map = map_pid_to_cmdline[pid]; |
790 | if (map == NO_CMDLINE_MAP) | 790 | if (map != NO_CMDLINE_MAP) |
791 | goto out; | 791 | strcpy(comm, saved_cmdlines[map]); |
792 | 792 | else | |
793 | strcpy(comm, saved_cmdlines[map]); | 793 | strcpy(comm, "<...>"); |
794 | 794 | ||
795 | out: | ||
796 | __raw_spin_unlock(&trace_cmdline_lock); | 795 | __raw_spin_unlock(&trace_cmdline_lock); |
797 | } | 796 | } |
798 | 797 | ||