[tip:tracing/syscalls] tracing/core: fix missing mutex unlock on tracing_set_tracer()

From: Frederic Weisbecker
Date: Mon Mar 16 2009 - 04:20:29 EST


Commit-ID: 59f586db98919d7d9c43527b26c8de1cdf9ed912
Gitweb: http://git.kernel.org/tip/59f586db98919d7d9c43527b26c8de1cdf9ed912
Author: Frederic Weisbecker <fweisbec@xxxxxxxxx>
AuthorDate: Sun, 15 Mar 2009 22:10:39 +0100
Commit: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Mon, 16 Mar 2009 09:13:17 +0100

tracing/core: fix missing mutex unlock on tracing_set_tracer()

Impact: fix possible locking imbalance

In case of ring buffer resize failure, tracing_set_tracer forgot to
release trace_types_lock. Fix it.

Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
LKML-Reference: <1237151439-6755-5-git-send-email-fweisbec@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
kernel/trace/trace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index efe3202..c0cf946 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2494,7 +2494,7 @@ static int tracing_set_tracer(const char *buf)
if (!ring_buffer_expanded) {
ret = tracing_resize_ring_buffer(trace_buf_size);
if (ret < 0)
- return ret;
+ goto out;
ret = 0;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/