tracing: Do not stop recording comms if the trace file is being read
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 17 Jun 2021 18:32:34 +0000 (14:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:50 +0000 (14:42 +0200)
commitb313bd944ddd419f69a3c32ccac77c1883dc4aa7
tree0d523c79b7412aa49c487bbefca89f80bf16b0d8
parentadb3849ed8d52af288ea3d384ec3fd00163a94e7
tracing: Do not stop recording comms if the trace file is being read

commit 4fdd595e4f9a1ff6d93ec702eaecae451cfc6591 upstream.

A while ago, when the "trace" file was opened, tracing was stopped, and
code was added to stop recording the comms to saved_cmdlines, for mapping
of the pids to the task name.

Code has been added that only records the comm if a trace event occurred,
and there's no reason to not trace it if the trace file is opened.

Cc: stable@vger.kernel.org
Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c