[lkml]   [2010]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[23/54] ecryptfs: release reference to lower mount if interpose fails
    2.6.34-stable review patch.  If anyone has any objections, please let us know.


    From: Lino Sanfilippo <>

    commit 31f73bee3e170b7cabb35db9e2f4bf7919b9d036 upstream.

    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 <>
    Signed-off-by: Tyler Hicks <>
    Signed-off-by: Greg Kroah-Hartman <>

    fs/ecryptfs/inode.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/fs/ecryptfs/inode.c
    +++ b/fs/ecryptfs/inode.c
    @@ -273,7 +273,7 @@ int ecryptfs_lookup_and_interpose_lower(
    printk(KERN_ERR "%s: Out of memory whilst attempting "
    "to allocate ecryptfs_dentry_info struct\n",
    - goto out_dput;
    + goto out_put;
    ecryptfs_set_dentry_lower(ecryptfs_dentry, lower_dentry);
    ecryptfs_set_dentry_lower_mnt(ecryptfs_dentry, lower_mnt);
    @@ -348,8 +348,9 @@ int ecryptfs_lookup_and_interpose_lower(
    kmem_cache_free(ecryptfs_header_cache_2, page_virt);
    goto out;
    + mntput(lower_mnt);
    return rc;

     \ /
      Last update: 2010-08-12 02:27    [W:0.026 / U:45.408 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site