提交 b06a8301 编写于 作者: S Steven Rostedt 提交者: Ingo Molnar

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: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 94523e81
......@@ -610,13 +610,12 @@ void tracing_start(void)
return;
spin_lock_irqsave(&tracing_start_lock, flags);
if (--trace_stop_count)
goto out;
if (--trace_stop_count) {
if (trace_stop_count < 0) {
/* Someone screwed up their debugging */
WARN_ON_ONCE(1);
trace_stop_count = 0;
}
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册