From: Jens Axboe <jens.axboe@oracle.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
Jens Axboe <axboe@suse.de>
Subject: Re: [PATCH 1/1] relay: fix lock imbalance in relay_late_setup_files
Date: Mon, 19 Jan 2009 11:15:10 +0100 [thread overview]
Message-ID: <20090119101509.GG30821@kernel.dk> (raw)
In-Reply-To: <1232190276-21200-1-git-send-email-jirislaby@gmail.com>
On Sat, Jan 17 2009, Jiri Slaby wrote:
> One fail path in relay_late_setup_files() omits
> mutex_unlock(&relay_channels_mutex);
> Add it.
>
> Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> Cc: Jens Axboe <axboe@suse.de>
> ---
> kernel/relay.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Looks good, applied!
>
> diff --git a/kernel/relay.c b/kernel/relay.c
> index 8ca1587..738bc85 100644
> --- a/kernel/relay.c
> +++ b/kernel/relay.c
> @@ -714,8 +714,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
> caught by stanse
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jens Axboe
prev parent reply other threads:[~2009-01-19 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-17 11:04 [PATCH 1/1] relay: fix lock imbalance in relay_late_setup_files Jiri Slaby
2009-01-17 19:41 ` Eduard - Gabriel Munteanu
2009-01-19 10:15 ` Jens Axboe [this message]
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=20090119101509.GG30821@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=axboe@suse.de \
--cc=eduard.munteanu@linux360.ro \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.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