From: "J. Bruce Fields" <bfields@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] locks: missing unlock on error in generic_add_lease()
Date: Wed, 13 Nov 2013 08:51:04 -0500 [thread overview]
Message-ID: <20131113135103.GA27536@pad.fieldses.org> (raw)
In-Reply-To: <20131113075627.GJ25541@elgon.mountain>
On Wed, Nov 13, 2013 at 10:56:27AM +0300, Dan Carpenter wrote:
> We should unlock here before returning.
A buggy-caller case, so shouldn't be a huge deal, but obviously should
be fixed, thanks!
Acked-by: J. Bruce Fields <bfields@redhat.com>
I'm assuming Al will pick it up.
(Though error = -EAGAIN and "goto out" would be more consistent with
other exits.)
--b.
>
> Fixes: df4e8d2c1d2b ('locks: implement delegations')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff.
>
> diff --git a/fs/locks.c b/fs/locks.c
> index f99d52b..92a0f0a 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -1494,6 +1494,7 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp
>
> if (is_deleg && arg == F_WRLCK) {
> /* Write delegations are not currently supported: */
> + mutex_unlock(&inode->i_mutex);
> WARN_ON_ONCE(1);
> return -EINVAL;
> }
next prev parent reply other threads:[~2013-11-13 13:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 7:56 [patch] locks: missing unlock on error in generic_add_lease() Dan Carpenter
2013-11-13 13:51 ` J. Bruce Fields [this message]
2013-11-13 14:07 ` Dan Carpenter
2013-11-13 14:10 ` [patch v2] " Dan Carpenter
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=20131113135103.GA27536@pad.fieldses.org \
--to=bfields@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).