mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: greg@kroah.com
Cc: chrisw@sous-sol.org, stable@kernel.org,
	linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH stable-27 2/2] relay: fix lock imbalance in relay_late_setup_files
Date: Wed, 28 Jan 2009 18:53:38 +0100	[thread overview]
Message-ID: <1233165221-20106-2-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1233165221-20106-1-git-send-email-jslaby@suse.cz>

From: Jiri Slaby <jirislaby@gmail.com>

One fail path in relay_late_setup_files() omits
mutex_unlock(&relay_channels_mutex);
Add it.

Commit b786c6a98ef6fa81114ba7b9fbfc0d67060775e3.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/relay.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/relay.c b/kernel/relay.c
index 8d13a78..b0bbf6f 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();
-- 
1.6.1


  reply	other threads:[~2009-01-28 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 17:53 [PATCH stable-27 1/2] PCI hotplug: fix lock imbalance in pciehp Jiri Slaby
2009-01-28 17:53 ` Jiri Slaby [this message]
2009-01-28 17:53   ` [PATCH stable-28 1/3] NET: net_namespace, fix lock imbalance Jiri Slaby
2009-01-28 17:53     ` [PATCH stable-28 2/3] PCI hotplug: fix lock imbalance in pciehp Jiri Slaby
2009-01-28 17:53       ` [PATCH stable-28 3/3] relay: fix lock imbalance in relay_late_setup_files Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233165221-20106-2-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=chrisw@sous-sol.org \
    --cc=greg@kroah.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®