summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-01-17 11:04:36 (GMT)
committerIngo Molnar <mingo@elte.hu>2009-01-18 19:29:35 (GMT)
commitb786c6a98ef6fa81114ba7b9fbfc0d67060775e3 (patch)
treebff900158067adba76c14a61499e4d9520463e86 /kernel
parentfdb6a8f4db813b4e50f4e975efe6be12ba5bf460 (diff)
downloadlinux-b786c6a98ef6fa81114ba7b9fbfc0d67060775e3.tar.xz
relay: fix lock imbalance in relay_late_setup_files
One fail path in relay_late_setup_files() omits mutex_unlock(&relay_channels_mutex); Add it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/relay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/relay.c b/kernel/relay.c
index 09ac200..9d79b78 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -663,8 +663,10 @@ int relay_late_setup_files(struct rchan *chan,
mutex_lock(&relay_channels_mutex);
/* Is chan already set up? */
- if (unlikely(chan->has_base_filename))
+ if (unlikely(chan->has_base_filename)) {
+ mutex_unlock(&relay_channels_mutex);
return -EEXIST;
+ }
chan->has_base_filename = 1;
chan->parent = parent;
curr_cpu = get_cpu();