diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-01-17 12:04:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-02 08:28:16 -0800 |
commit | 4fd5fccf67fb4944df10ddec1975dbfed38fd0d6 (patch) | |
tree | 0addd1c91949094ab35bf4332a2f2e8870cb32db | |
parent | ae934bc9b4f3b49fc83617792cce6ca938e3fbd0 (diff) |
relay: fix lock imbalance in relay_late_setup_files
commit b786c6a98ef6fa81114ba7b9fbfc0d67060775e3 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | kernel/relay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/relay.c b/kernel/relay.c index 8d13a7855c08..b0bbf6ffd199 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -664,8 +664,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(); |