From: Steven Rostedt Date: Thu, 22 Jan 2009 19:26:15 +0000 (-0500) Subject: trace: fix logic to start/stop counting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b06a830183b610c0a88c29a92feb7991a867ab46;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 757ae6f7e648..2129ab9d2a48 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -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 < 0) { - /* Someone screwed up their debugging */ - WARN_ON_ONCE(1); - trace_stop_count = 0; + if (--trace_stop_count) { + if (trace_stop_count < 0) { + /* Someone screwed up their debugging */ + WARN_ON_ONCE(1); + trace_stop_count = 0; + } goto out; }