trace: fix logic to start/stop counting
The logic in the tracing_start/stop code prevents the WARN_ON from ever detecting if a start/stop pair was mismatched. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
94523e818f
commit
b06a830183
|
@ -610,13 +610,12 @@ void tracing_start(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
spin_lock_irqsave(&tracing_start_lock, flags);
|
spin_lock_irqsave(&tracing_start_lock, flags);
|
||||||
if (--trace_stop_count)
|
if (--trace_stop_count) {
|
||||||
goto out;
|
if (trace_stop_count < 0) {
|
||||||
|
/* Someone screwed up their debugging */
|
||||||
if (trace_stop_count < 0) {
|
WARN_ON_ONCE(1);
|
||||||
/* Someone screwed up their debugging */
|
trace_stop_count = 0;
|
||||||
WARN_ON_ONCE(1);
|
}
|
||||||
trace_stop_count = 0;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue