lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111101233708.GK18701@quack.suse.cz>
Date:	Wed, 2 Nov 2011 00:37:08 +0100
From:	Jan Kara <jack@...e.cz>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	devel@...nvz.org, Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] fs: fix dentry leak in simple_fill_super()

On Tue 01-11-11 16:12:33, Konstantin Khlebnikov wrote:
> put dentry if inode allocation failed, d_genocide() cannot release it
  Al is currently ill and Christoph Hellwig is taking care of fixes for
now. Added him to CC...

								Honza

> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
> ---
>  fs/libfs.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/libfs.c b/fs/libfs.c
> index c18e9a1..a2c0029 100644
> --- a/fs/libfs.c
> +++ b/fs/libfs.c
> @@ -510,8 +510,10 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
>  		if (!dentry)
>  			goto out;
>  		inode = new_inode(s);
> -		if (!inode)
> +		if (!inode) {
> +			dput(dentry);
>  			goto out;
> +		}
>  		inode->i_mode = S_IFREG | files->mode;
>  		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
>  		inode->i_fop = files->ops;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ