From: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: kirkland@canonical.com, ecryptfs-devel@lists.launchpad.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ecryptfs (repost): release reference to lower mount if interpose fails
Date: Fri, 30 Jul 2010 18:35:44 -0500 [thread overview]
Message-ID: <20100730233544.GA31723@boomer> (raw)
In-Reply-To: <20100729110136.GC8337@lsanfilippo.unix.rd.tt.avira.com>
On Thu Jul 29, 2010 at 01:01:36PM +0200, Lino Sanfilippo <LinoSanfilippo@gmx.de> wrote:
>
> In ecryptfs_lookup_and_interpose_lower() the lower mount is not decremented
> if allocation of a dentry info struct failed. As a result the lower filesystem
> cant be unmounted any more (since it is considered busy). This patch corrects
> the reference counting.
>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
> ---
Hi Lino,
Thanks for the fix. Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6.git#next
Tyler
> This patch is against 2.6.35-rc5.
>
> --- a/fs/ecryptfs/inode.c 2010-07-12 23:55:33.000000000 +0200
> +++ b/fs/ecryptfs/inode.c 2010-07-19 19:21:16.000000000 +0200
> @@ -264,7 +264,7 @@ int ecryptfs_lookup_and_interpose_lower(
> printk(KERN_ERR "%s: Out of memory whilst attempting "
> "to allocate ecryptfs_dentry_info struct\n",
> __func__);
> - goto out_dput;
> + goto out_put;
> }
> ecryptfs_set_dentry_lower(ecryptfs_dentry, lower_dentry);
> ecryptfs_set_dentry_lower_mnt(ecryptfs_dentry, lower_mnt);
> @@ -339,8 +339,9 @@ int ecryptfs_lookup_and_interpose_lower(
> out_free_kmem:
> kmem_cache_free(ecryptfs_header_cache_2, page_virt);
> goto out;
> -out_dput:
> +out_put:
> dput(lower_dentry);
> + mntput(lower_mnt);
> d_drop(ecryptfs_dentry);
> out:
> return rc;
prev parent reply other threads:[~2010-07-30 23:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 11:01 [PATCH] ecryptfs (repost): release reference to lower mount if interpose fails Lino Sanfilippo
2010-07-30 23:35 ` Tyler Hicks [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=20100730233544.GA31723@boomer \
--to=tyhicks@linux.vnet.ibm.com \
--cc=LinoSanfilippo@gmx.de \
--cc=ecryptfs-devel@lists.launchpad.net \
--cc=kirkland@canonical.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