浏览代码

tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists

The start function of the hwlat tracer should never be called when the hwlat
thread already exists. If it is called, do a WARN_ON().

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Steven Rostedt (VMware) 7 年之前
父节点
当前提交
978defee11
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/trace/trace_hwlat.c

+ 1 - 1
kernel/trace/trace_hwlat.c

@@ -354,7 +354,7 @@ static int start_kthread(struct trace_array *tr)
 	struct task_struct *kthread;
 	struct task_struct *kthread;
 	int next_cpu;
 	int next_cpu;
 
 
-	if (hwlat_kthread)
+	if (WARN_ON(hwlat_kthread))
 		return 0;
 		return 0;
 
 
 	/* Just pick the first CPU on first iteration */
 	/* Just pick the first CPU on first iteration */