Skip to content

Commit

Permalink
tracing: Do a WARN_ON() if start_thread() in hwlat is called when thr…
Browse files Browse the repository at this point in the history
…ead 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) <[email protected]>
  • Loading branch information
rostedt committed Aug 1, 2018
1 parent 82fbc8c commit 978defe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_hwlat.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static int start_kthread(struct trace_array *tr)
struct task_struct *kthread;
int next_cpu;

if (hwlat_kthread)
if (WARN_ON(hwlat_kthread))
return 0;

/* Just pick the first CPU on first iteration */
Expand Down

0 comments on commit 978defe

Please sign in to comment.