diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-08-01 16:06:02 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-08-01 16:06:02 -0400 |
commit | 978defee11a5d54f8f546e79867d2aab1b50606b (patch) | |
tree | 1cafefa160f1cfb9a397a7526860a9088ea48ac0 | |
parent | 82fbc8c48adffd73297e7edbd7266a89d00cc52f (diff) |
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>
-rw-r--r-- | kernel/trace/trace_hwlat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c index 2d9d36dd5fe7..688e48be7bb5 100644 --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c | |||
@@ -354,7 +354,7 @@ static int start_kthread(struct trace_array *tr) | |||
354 | struct task_struct *kthread; | 354 | struct task_struct *kthread; |
355 | int next_cpu; | 355 | int next_cpu; |
356 | 356 | ||
357 | if (hwlat_kthread) | 357 | if (WARN_ON(hwlat_kthread)) |
358 | return 0; | 358 | return 0; |
359 | 359 | ||
360 | /* Just pick the first CPU on first iteration */ | 360 | /* Just pick the first CPU on first iteration */ |