Skip to contentSkip to conversation

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

tip:tracing/syscalls Frederic Weisbecker 1 participant 1 message Mar 16, 2009 1 message not in the archive Tracing

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Commit-ID:  59f586db98919d7d9c43527b26c8de1cdf9ed912
Gitweb:     http://git.kernel.org/tip/59f586db98919d7d9c43527b26c8de1cdf9ed912
Author:     Frederic Weisbecker <[email protected]>
AuthorDate: Sun, 15 Mar 2009 22:10:39 +0100
Commit:     Ingo Molnar <[email protected]>
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.

LKML-Reference: <[email protected]>

---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/trace/trace.c +1 -1
index efe3202..c0cf946 100644
@@ -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;
 	}