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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Nov 2018 10:25:49 -0500
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Vasily Averin <vvs@...tuozzo.com>
Cc:     linux-ext4@...r.kernel.org,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] ext4: lost brelse in __ext4_read_dirblock()

On Wed, Oct 31, 2018 at 10:12:18PM +0300, Vasily Averin wrote:
> Fixes dc6982ff4db1 ("ext4: refactor code to read directory blocks ...") # 3.9
> 
> Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
> ---
>  fs/ext4/namei.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index d388cce72db2..1a21e59ede72 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -111,6 +111,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
>  	if (!bh) {
>  		ext4_error_inode(inode, func, line, block,
>  				 "Directory hole found");
> +		brelse(bh);
>  		return ERR_PTR(-EFSCORRUPTED);
>  	}
>  	dirent = (struct ext4_dir_entry *) bh->b_data;

Inside the conditional, bh == NULL, so the brelse isn't needed.

Cheers,

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ