diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-22 14:26:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-23 05:10:45 -0500 |
commit | b06a830183b610c0a88c29a92feb7991a867ab46 (patch) | |
tree | c90c58ddf3e34a8f19c31bdd9b6522f987bad279 | |
parent | 94523e818f283d3c69f621406f633afff46dbf82 (diff) |
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>
-rw-r--r-- | kernel/trace/trace.c | 13 |
1 files changed, 6 insertions, 7 deletions
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) | |||
610 | return; | 610 | return; |
611 | 611 | ||
612 | spin_lock_irqsave(&tracing_start_lock, flags); | 612 | spin_lock_irqsave(&tracing_start_lock, flags); |
613 | if (--trace_stop_count) | 613 | if (--trace_stop_count) { |
614 | goto out; | 614 | if (trace_stop_count < 0) { |
615 | 615 | /* Someone screwed up their debugging */ | |
616 | if (trace_stop_count < 0) { | 616 | WARN_ON_ONCE(1); |
617 | /* Someone screwed up their debugging */ | 617 | trace_stop_count = 0; |
618 | WARN_ON_ONCE(1); | 618 | } |
619 | trace_stop_count = 0; | ||
620 | goto out; | 619 | goto out; |
621 | } | 620 | } |
622 | 621 | ||