[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201206111557.264012863@linuxfoundation.org>
Date: Sun, 6 Dec 2020 12:17:31 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Vasily Averin <vvs@...tuozzo.com>,
"Steven Rostedt (VMware)" <rostedt@...dmis.org>
Subject: [PATCH 4.19 31/32] tracing: Remove WARN_ON in start_thread()
From: Vasily Averin <vvs@...tuozzo.com>
commit 310e3a4b5a4fc718a72201c1e4cf5c64ac6f5442 upstream.
This patch reverts commit 978defee11a5 ("tracing: Do a WARN_ON()
if start_thread() in hwlat is called when thread exists")
.start hook can be legally called several times if according
tracer is stopped
screen window 1
[root@...alhost ~]# echo 1 > /sys/kernel/tracing/events/kmem/kfree/enable
[root@...alhost ~]# echo 1 > /sys/kernel/tracing/options/pause-on-trace
[root@...alhost ~]# less -F /sys/kernel/tracing/trace
screen window 2
[root@...alhost ~]# cat /sys/kernel/debug/tracing/tracing_on
0
[root@...alhost ~]# echo hwlat > /sys/kernel/debug/tracing/current_tracer
[root@...alhost ~]# echo 1 > /sys/kernel/debug/tracing/tracing_on
[root@...alhost ~]# cat /sys/kernel/debug/tracing/tracing_on
0
[root@...alhost ~]# echo 2 > /sys/kernel/debug/tracing/tracing_on
triggers warning in dmesg:
WARNING: CPU: 3 PID: 1403 at kernel/trace/trace_hwlat.c:371 hwlat_tracer_start+0xc9/0xd0
Link: https://lkml.kernel.org/r/bd4d3e70-400d-9c82-7b73-a2d695e86b58@virtuozzo.com
Cc: Ingo Molnar <mingo@...hat.com>
Cc: stable@...r.kernel.org
Fixes: 978defee11a5 ("tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists")
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/trace/trace_hwlat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c
@@ -355,7 +355,7 @@ static int start_kthread(struct trace_ar
struct task_struct *kthread;
int next_cpu;
- if (WARN_ON(hwlat_kthread))
+ if (hwlat_kthread)
return 0;
/* Just pick the first CPU on first iteration */
Powered by blists - more mailing lists