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:   Tue, 14 Feb 2023 01:18:28 +0530
From:   Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To:     Kemeng Shi <shikemeng@...weicloud.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca, jack@...e.cz,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/21] ext4: remove unnecessary e4b->bd_buddy_page check
 in ext4_mb_load_buddy_gfp

On Fri, Feb 10, 2023 at 03:48:15AM +0800, Kemeng Shi wrote:
> e4b->bd_buddy_page is only set if we initialize ext4_buddy successfully. So
> e4b->bd_buddy_page is always NULL in error handle branch. Just remove the
> dead check.
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
> ---
>  fs/ext4/mballoc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 15fc7105becc..74da24c9bf14 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1555,8 +1555,7 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group,
>  		put_page(page);
>  	if (e4b->bd_bitmap_page)
>  		put_page(e4b->bd_bitmap_page);
> -	if (e4b->bd_buddy_page)
> -		put_page(e4b->bd_buddy_page);
> +
>  	e4b->bd_buddy = NULL;
>  	e4b->bd_bitmap = NULL;
>  	return ret;
> -- 
> 2.30.0
> 
Feel free to add:

Reviewed-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ