From: Jiri Slaby Date: Sat, 17 Jan 2009 11:04:36 +0000 (+0100) Subject: relay: fix lock imbalance in relay_late_setup_files X-Git-Tag: v2.6.28.3~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=624fb2d172a735c3ea5efb043e00034d6faf8612;p=karo-tx-linux.git 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 Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/relay.c b/kernel/relay.c index 09ac2008f77b..9d79b7854fa6 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();